Skip to content

Commit

Permalink
Initial commit after AndroidX conversion using Android Studio refacto…
Browse files Browse the repository at this point in the history
…r tool
  • Loading branch information
tiembo authored and florina-muntenescu committed Oct 21, 2018
1 parent e58c9fc commit 68897db
Show file tree
Hide file tree
Showing 125 changed files with 352 additions and 351 deletions.
12 changes: 6 additions & 6 deletions about/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk

testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

compileOptions {
Expand All @@ -48,15 +48,15 @@ dependencies {
kapt "com.google.dagger:dagger-compiler:${versions.dagger}"

testImplementation project(':test_shared')
testImplementation "android.arch.core:core-testing:${versions.lifecycle}"
testImplementation 'androidx.arch.core:core-testing:2.0.0'
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:${versions.mockito_kotlin}"
testImplementation "junit:junit:${versions.junit}"

androidTestImplementation project(':test_shared')
androidTestImplementation "android.arch.core:core-testing:${versions.lifecycle}"
androidTestImplementation "com.android.support.test:runner:${versions.test_runner}"
androidTestImplementation "com.android.support.test:rules:${versions.test_rules}"
androidTestImplementation "com.android.support.test.espresso:espresso-core:${versions.espresso}"
androidTestImplementation 'androidx.arch.core:core-testing:2.0.0'
androidTestImplementation 'androidx.test:runner:1.1.0-beta02'
androidTestImplementation 'androidx.test:rules:1.1.0-beta02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-beta02'
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:${versions.mockito_kotlin}"
androidTestImplementation "org.mockito:mockito-android:${versions.mockito}"
androidTestImplementation "org.mockito:mockito-core:${versions.mockito}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package io.plaidapp.about.ui.model

import `in`.uncod.android.bypass.Markdown
import android.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import android.content.res.ColorStateList
import android.content.res.Resources
import com.nhaarman.mockitokotlin2.any
Expand Down
10 changes: 5 additions & 5 deletions about/src/main/java/io/plaidapp/about/ui/AboutActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

package io.plaidapp.about.ui

import android.arch.lifecycle.ViewModelProviders
import androidx.lifecycle.ViewModelProviders
import android.os.Bundle
import android.support.customtabs.CustomTabsIntent
import android.support.v4.content.ContextCompat
import android.support.v4.view.ViewPager
import android.support.v7.app.AppCompatActivity
import androidx.browser.customtabs.CustomTabsIntent
import androidx.core.content.ContextCompat
import androidx.viewpager.widget.ViewPager
import androidx.appcompat.app.AppCompatActivity
import android.transition.TransitionInflater
import androidx.core.net.toUri
import io.plaidapp.about.R
Expand Down
4 changes: 2 additions & 2 deletions about/src/main/java/io/plaidapp/about/ui/AboutStyler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package io.plaidapp.about.ui

import android.content.res.ColorStateList
import android.support.annotation.ColorInt
import android.support.v7.content.res.AppCompatResources
import androidx.annotation.ColorInt
import androidx.appcompat.content.res.AppCompatResources
import io.plaidapp.core.util.ColorUtils
import javax.inject.Inject
import io.plaidapp.core.R as coreR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package io.plaidapp.about.ui.adapter

import android.support.v4.view.PagerAdapter
import android.support.v7.widget.RecyclerView
import androidx.viewpager.widget.PagerAdapter
import androidx.recyclerview.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.plaidapp.about.ui.adapter

import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.ViewGroup
import io.plaidapp.about.R
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package io.plaidapp.about.ui.adapter

import android.annotation.SuppressLint
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.View
import android.widget.Button
import android.widget.ImageView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.plaidapp.about.ui.adapter

import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.View

internal class LibraryIntroHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
12 changes: 6 additions & 6 deletions about/src/main/java/io/plaidapp/about/ui/model/AboutViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
package io.plaidapp.about.ui.model

import `in`.uncod.android.bypass.Markdown
import android.arch.lifecycle.LiveData
import android.arch.lifecycle.MutableLiveData
import android.arch.lifecycle.ViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import android.content.res.ColorStateList
import android.content.res.Resources
import android.support.annotation.ColorInt
import android.support.annotation.StringRes
import android.support.annotation.VisibleForTesting
import androidx.annotation.ColorInt
import androidx.annotation.StringRes
import androidx.annotation.VisibleForTesting
import android.text.Layout
import android.text.Spannable
import android.text.SpannableString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package io.plaidapp.about.ui.model

import android.arch.lifecycle.ViewModel
import android.arch.lifecycle.ViewModelProvider
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import javax.inject.Inject

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import android.graphics.Paint
import android.graphics.PorterDuff
import android.graphics.PorterDuffXfermode
import android.graphics.Rect
import android.support.v4.content.res.ResourcesCompat
import androidx.core.content.res.ResourcesCompat
import android.text.TextPaint
import android.util.AttributeSet
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.support.v4.view.ViewPager;
import androidx.viewpager.widget.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
Expand Down
4 changes: 2 additions & 2 deletions about/src/main/res/layout/about_libs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
android:layout_height="match_parent"
android:background="@color/grey_200" />

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/libs_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/spacing_normal"
android:clipToPadding="false"
android:scrollbars="vertical"
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

</FrameLayout>
2 changes: 1 addition & 1 deletion about/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
app:dragDismissScale="0.95"
tools:context=".ui.AboutActivity">

<android.support.v4.view.ViewPager
<androidx.viewpager.widget.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package io.plaidapp.about.ui.model

import `in`.uncod.android.bypass.Markdown
import android.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import android.content.res.ColorStateList
import android.content.res.Resources
import com.nhaarman.mockitokotlin2.any
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {
versionName = '1.0.5'
archivesBaseName = 'plaid'

testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

resConfig 'en'
buildConfigField 'String', 'GIT_SHA', "\"${gitSha}\""
Expand Down Expand Up @@ -79,9 +79,9 @@ dependencies {
implementation "com.crashlytics.sdk.android:crashlytics:${versions.crashlytics}"
implementation "com.google.firebase:firebase-core:${versions.firebase}"

androidTestImplementation "com.android.support.test:rules:${versions.test_rules}"
androidTestImplementation "com.android.support.test.espresso:espresso-contrib:${versions.espresso}"
androidTestImplementation "com.android.support.test.uiautomator:uiautomator-v18:${versions.ui_automator}"
androidTestImplementation 'androidx.test:rules:1.1.0-beta02'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0-beta02'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0-beta02'
kapt "com.google.dagger:dagger-compiler:${versions.dagger}"
}

Expand Down
18 changes: 9 additions & 9 deletions app/src/androidTest/java/io/plaidapp/ui/HomeActivityTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

package io.plaidapp.ui

import android.support.test.InstrumentationRegistry
import android.support.test.espresso.Espresso.onView
import android.support.test.espresso.action.ViewActions.click
import android.support.test.espresso.assertion.ViewAssertions.matches
import android.support.test.espresso.contrib.DrawerMatchers.isClosed
import android.support.test.espresso.contrib.DrawerMatchers.isOpen
import android.support.test.espresso.matcher.ViewMatchers.withId
import android.support.test.rule.ActivityTestRule
import android.support.test.uiautomator.UiDevice
import androidx.test.InstrumentationRegistry
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.DrawerMatchers.isClosed
import androidx.test.espresso.contrib.DrawerMatchers.isOpen
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.rule.ActivityTestRule
import androidx.test.uiautomator.UiDevice
import android.view.Gravity
import io.plaidapp.R
import org.junit.Rule
Expand Down
16 changes: 8 additions & 8 deletions app/src/main/java/io/plaidapp/ui/HomeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
import android.graphics.drawable.AnimatedVectorDrawable;
import android.net.*;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.ItemTouchHelper;
import android.text.*;
import android.text.style.ForegroundColorSpan;
import android.text.style.ImageSpan;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import android.graphics.PorterDuff
import android.graphics.PorterDuffColorFilter
import android.graphics.Shader.TileMode.CLAMP
import android.graphics.drawable.Drawable
import android.support.v4.content.ContextCompat
import android.support.v7.widget.RecyclerView
import android.support.v7.widget.RecyclerView.ViewHolder
import android.support.v7.widget.helper.ItemTouchHelper
import android.support.v7.widget.helper.ItemTouchHelper.START
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ViewHolder
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.ItemTouchHelper.START
import io.plaidapp.R
import io.plaidapp.core.ui.FilterViewHolder
import io.plaidapp.core.ui.recyclerview.FilterSwipeDismissListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.ColorInt;
import android.support.annotation.ColorRes;
import android.support.annotation.DimenRes;
import android.support.annotation.Dimension;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.DimenRes;
import androidx.annotation.Dimension;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;

import io.plaidapp.core.ui.recyclerview.Divided;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.Keep;
import androidx.annotation.Keep;
import android.transition.TransitionValues;
import android.transition.Visibility;
import android.util.AttributeSet;
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/res/layout/activity_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
limitations under the License.
-->

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
tools:context=".ui.HomeActivity">
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
tools:context=".ui.HomeActivity">

<FrameLayout
android:layout_width="match_parent"
Expand All @@ -34,7 +34,7 @@
android:layout_height="0dp"
android:background="@color/status_bar_back" />

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -101,7 +101,7 @@
</FrameLayout>

<!-- filter drawer -->
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/filters"
android:layout_width="@dimen/drawer_width"
android:layout_height="match_parent"
Expand All @@ -113,7 +113,7 @@
android:paddingBottom="@dimen/spacing_normal"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/filter_item" />

</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
Loading

0 comments on commit 68897db

Please sign in to comment.