Skip to content

Commit ad7f019

Browse files
committed
move to androidx
1 parent 3533489 commit ad7f019

File tree

14 files changed

+43
-41
lines changed

14 files changed

+43
-41
lines changed

app/build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android {
1212
targetSdkVersion 28
1313
versionCode 1
1414
versionName "1.0"
15-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616
}
1717
buildTypes {
1818
release {
@@ -26,10 +26,10 @@ dependencies {
2626
implementation fileTree(dir: 'libs', include: ['*.jar'])
2727
implementation project(':bottomdrawer')
2828
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
29-
implementation 'com.android.support:appcompat-v7:28.0.0'
30-
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
31-
implementation 'com.android.support:design:28.0.0'
29+
implementation 'androidx.appcompat:appcompat:1.0.2'
30+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
31+
implementation 'com.google.android.material:material:1.0.0'
3232
testImplementation 'junit:junit:4.12'
33-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
34-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
33+
androidTestImplementation 'androidx.test:runner:1.2.0'
34+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
3535
}

app/src/androidTest/java/com/github/heyalex/bottomdrawerexample/ExampleInstrumentedTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.github.heyalex.bottomdrawerexample
22

3-
import android.support.test.InstrumentationRegistry
4-
import android.support.test.runner.AndroidJUnit4
3+
import androidx.test.InstrumentationRegistry
4+
import androidx.test.runner.AndroidJUnit4
55

66
import org.junit.Test
77
import org.junit.runner.RunWith

app/src/main/java/com/github/heyalex/bottomdrawerexample/MainActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.github.heyalex.bottomdrawerexample
22

33
import android.os.Bundle
4-
import android.support.v7.app.AppCompatActivity
4+
import androidx.appcompat.app.AppCompatActivity
55
import kotlinx.android.synthetic.main.activity_main.*
66

77
class MainActivity : AppCompatActivity() {

app/src/main/res/layout/activity_main.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
@@ -16,4 +16,4 @@
1616
app:layout_constraintRight_toRightOf="parent"
1717
app:layout_constraintTop_toTopOf="parent" />
1818

19-
</android.support.constraint.ConstraintLayout>
19+
</androidx.constraintlayout.widget.ConstraintLayout>

app/src/main/res/layout/google_task_example_layout.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
style="@style/Divider.Horizontal"
6767
android:layout_marginTop="12dp" />
6868

69-
<android.support.v4.widget.NestedScrollView
69+
<androidx.core.widget.NestedScrollView
7070
android:layout_width="match_parent"
7171
android:layout_height="match_parent"
7272
android:paddingLeft="14dp"
@@ -224,6 +224,6 @@
224224
android:text="TEST DATA"
225225
android:textSize="20sp" />
226226
</LinearLayout>
227-
</android.support.v4.widget.NestedScrollView>
227+
</androidx.core.widget.NestedScrollView>
228228

229229
</LinearLayout>

bottomdrawer/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313
versionCode 1
1414
versionName "1.0"
1515

16-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717

1818
}
1919

@@ -28,11 +28,11 @@ android {
2828
dependencies {
2929
implementation fileTree(dir: 'libs', include: ['*.jar'])
3030

31-
implementation 'com.android.support:appcompat-v7:28.0.0'
32-
implementation 'com.android.support:design:28.0.0'
31+
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
32+
implementation 'com.google.android.material:material:1.0.0-beta01'
3333
testImplementation 'junit:junit:4.12'
34-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
35-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
34+
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
35+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
3636
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
3737
}
3838
repositories {

bottomdrawer/src/androidTest/java/com/github/heyalex/bottomdrawer/ExampleInstrumentedTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.heyalex.bottomdrawer;
22

33
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
4+
import androidx.test.InstrumentationRegistry;
5+
import androidx.test.runner.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;

bottomdrawer/src/main/java/com/github/heyalex/bottomdrawer/BottomDrawer.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import android.graphics.Canvas
55
import android.graphics.Rect
66
import android.graphics.drawable.GradientDrawable
77
import android.os.Build
8-
import android.support.v4.content.ContextCompat
9-
import android.support.v4.view.ViewCompat
8+
import androidx.core.content.ContextCompat
9+
import androidx.core.view.ViewCompat
1010
import android.util.AttributeSet
1111
import android.view.View
1212
import android.view.ViewGroup

bottomdrawer/src/main/java/com/github/heyalex/bottomdrawer/BottomDrawerDialog.kt

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import android.os.Build
66
import android.os.Bundle
77
import android.os.Handler
88
import android.os.Looper
9-
import android.support.annotation.LayoutRes
10-
import android.support.annotation.StyleRes
11-
import android.support.design.widget.BottomSheetBehavior
12-
import android.support.design.widget.CoordinatorLayout
13-
import android.support.v4.view.AccessibilityDelegateCompat
14-
import android.support.v4.view.ViewCompat
15-
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat
16-
import android.support.v7.app.AppCompatDialog
9+
import androidx.annotation.LayoutRes
10+
import androidx.annotation.StyleRes
11+
import com.google.android.material.bottomsheet.BottomSheetBehavior
12+
import androidx.coordinatorlayout.widget.CoordinatorLayout
13+
import androidx.core.view.AccessibilityDelegateCompat
14+
import androidx.core.view.ViewCompat
15+
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat
16+
import androidx.appcompat.app.AppCompatDialog
1717
import android.view.View
1818
import android.view.ViewGroup
1919
import android.view.Window

bottomdrawer/src/main/java/com/github/heyalex/bottomdrawer/BottomDrawerFragment.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ package com.github.heyalex.bottomdrawer
22

33
import android.app.Dialog
44
import android.os.Bundle
5-
import android.support.annotation.LayoutRes
6-
import android.support.design.widget.BottomSheetBehavior
7-
import android.support.v4.app.DialogFragment
5+
import androidx.annotation.LayoutRes
6+
import androidx.fragment.app.DialogFragment
87
import android.view.LayoutInflater
98
import android.view.View
109
import android.view.ViewGroup
1110
import android.view.ViewTreeObserver
11+
import com.google.android.material.bottomsheet.BottomSheetBehavior
1212

13-
abstract class BottomDrawerFragment : DialogFragment(), ViewTreeObserver.OnGlobalLayoutListener {
13+
abstract class BottomDrawerFragment : androidx.fragment.app.DialogFragment(), ViewTreeObserver.OnGlobalLayoutListener {
1414

1515
private var bottomDrawerDialog: BottomDrawerDialog? = null
1616

bottomdrawer/src/main/java/com/github/heyalex/handle/PlainHandleView.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import android.graphics.Paint
66
import android.graphics.RectF
77
import android.os.Parcel
88
import android.os.Parcelable
9-
import android.support.annotation.FloatRange
10-
import android.support.v4.content.ContextCompat
9+
import androidx.annotation.FloatRange
10+
import androidx.core.content.ContextCompat
1111
import android.util.AttributeSet
1212
import android.util.Log
1313
import android.view.View

bottomdrawer/src/main/java/com/github/heyalex/handle/PullHandleView.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import android.graphics.Canvas
55
import android.graphics.Paint
66
import android.os.Parcel
77
import android.os.Parcelable
8-
import android.support.annotation.FloatRange
9-
import android.support.v4.content.ContextCompat
8+
import androidx.annotation.FloatRange
9+
import androidx.core.content.ContextCompat
1010
import android.util.AttributeSet
1111
import android.view.View
1212
import com.github.heyalex.bottomdrawer.R

bottomdrawer/src/main/res/layout/bottom_drawer_layout.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
android:layout_height="match_parent"
77
android:fitsSystemWindows="false">
88

9-
<android.support.design.widget.CoordinatorLayout
9+
<androidx.coordinatorlayout.widget.CoordinatorLayout
1010
android:id="@+id/bottom_sheet_coordinator"
1111
android:layout_width="match_parent"
1212
android:layout_height="match_parent"
@@ -26,7 +26,7 @@
2626
android:layout_height="wrap_content"
2727
android:fitsSystemWindows="false"
2828
app:behavior_hideable="true"
29-
app:layout_behavior="android.support.design.widget.BottomSheetBehavior" />
29+
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" />
3030

31-
</android.support.design.widget.CoordinatorLayout>
31+
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3232
</FrameLayout>

gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ org.gradle.jvmargs=-Xmx1536m
1313
# org.gradle.parallel=true
1414
# Kotlin code style for this project: "official" or "obsolete":
1515
kotlin.code.style=official
16+
android.useAndroidX=true
17+
android.enableJetifier=true

0 commit comments

Comments
 (0)