Skip to content
This repository was archived by the owner on Aug 22, 2020. It is now read-only.

Commit 43cc491

Browse files
committed
Update dependecies to AndroidX
Signed-off-by: Siubeng Fung <[email protected]>
1 parent 25d7ead commit 43cc491

24 files changed

+138
-99
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
*.iml
22
.gradle
33
/local.properties
4-
/gradle.properties
54
/.idea
65
.DS_Store
76
/build

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ PayPal: [https://www.paypal.me/fython](https://www.paypal.me/fython)
5454
```
5555
MIT License
5656
57-
Copyright (c) 2017-2018 Fung Go (fython)
57+
Copyright (c) 2017-2020 Siubeng Fung (fython)
5858
5959
Permission is hereby granted, free of charge, to any person obtaining a copy
6060
of this software and associated documentation files (the "Software"), to deal

build.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
2-
ext.kotlin_version = '1.2.21'
2+
ext.kotlin_version = '1.3.61'
33
repositories {
44
jcenter()
55
google()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.0.1'
8+
classpath 'com.android.tools.build:gradle:4.0.0-alpha09'
99
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1010
}
1111
}
@@ -23,10 +23,8 @@ task clean(type: Delete) {
2323
}
2424

2525
ext {
26-
supportLibraryVersion = '27.1.0'
2726
minSdkVersion = 17
28-
targetSdkVersion = 27
29-
buildToolsVersion = "27.0.2"
27+
targetSdkVersion = 29
3028
versionCode = 7
31-
versionName = '0.2.4.2'
29+
versionName = '0.2.5'
3230
}

demo-kotlin/build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'
33

44
android {
55
compileSdkVersion rootProject.ext.targetSdkVersion
6-
buildToolsVersion rootProject.ext.buildToolsVersion
76

87
defaultConfig {
98
minSdkVersion rootProject.ext.minSdkVersion
@@ -34,10 +33,9 @@ dependencies {
3433
})
3534
testImplementation 'junit:junit:4.12'
3635

37-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
38-
implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
39-
implementation "com.android.support:design:$supportLibraryVersion"
40-
implementation "com.android.support:customtabs:$supportLibraryVersion"
36+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
37+
implementation 'androidx.appcompat:appcompat:1.1.0'
38+
implementation 'com.google.android.material:material:1.2.0-alpha04'
4139
implementation 'moe.feng:AlipayZeroSdk:1.1'
4240
implementation project(':library')
4341
}

demo-kotlin/src/main/kotlin/moe/feng/common/stepperview/demo/MainActivity.kt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package moe.feng.common.stepperview.demo
22

33
import android.app.AlertDialog
4+
import android.content.Intent
45
import android.net.Uri
56
import android.os.Bundle
6-
import android.support.customtabs.CustomTabsIntent
7-
import android.support.design.widget.NavigationView
8-
import android.support.v4.app.Fragment
9-
import android.support.v4.widget.DrawerLayout
10-
import android.support.v7.app.AppCompatActivity
117
import android.view.MenuItem
12-
8+
import androidx.appcompat.app.AppCompatActivity
9+
import androidx.drawerlayout.widget.DrawerLayout
10+
import androidx.fragment.app.Fragment
11+
import com.google.android.material.navigation.NavigationView
1312
import moe.feng.alipay.zerosdk.AlipayZeroSdk
1413
import moe.feng.common.stepperview.demo.fragment.VerticalStepperAdapterDemoFragment
1514
import moe.feng.common.stepperview.demo.fragment.VerticalStepperDemoFragment
@@ -91,9 +90,12 @@ class MainActivity : AppCompatActivity() {
9190
}
9291

9392
private fun openWebsite(url: String) {
94-
val builder = CustomTabsIntent.Builder()
95-
builder.setToolbarColor(resources.getColor(R.color.colorPrimary))
96-
builder.build().launchUrl(this, Uri.parse(url))
93+
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
94+
try {
95+
startActivity(intent)
96+
} catch (e: Exception) {
97+
e.printStackTrace()
98+
}
9799
}
98100

99101
}

demo-kotlin/src/main/kotlin/moe/feng/common/stepperview/demo/fragment/VerticalStepperAdapterDemoFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ package moe.feng.common.stepperview.demo.fragment
22

33
import android.content.Context
44
import android.os.Bundle
5-
import android.support.design.widget.Snackbar
6-
import android.support.v4.app.Fragment
75
import android.text.Html
86
import android.view.LayoutInflater
97
import android.view.View
108
import android.view.ViewGroup
119
import android.widget.Button
1210
import android.widget.TextView
11+
import androidx.fragment.app.Fragment
12+
import com.google.android.material.snackbar.Snackbar
1313

1414
import moe.feng.common.stepperview.IStepperAdapter
1515
import moe.feng.common.stepperview.VerticalStepperItemView

demo-kotlin/src/main/kotlin/moe/feng/common/stepperview/demo/fragment/VerticalStepperDemoFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package moe.feng.common.stepperview.demo.fragment
22

33
import android.os.Bundle
4-
import android.support.design.widget.Snackbar
5-
import android.support.v4.app.Fragment
64
import android.view.LayoutInflater
75
import android.view.View
86
import android.view.ViewGroup
97
import android.widget.Button
8+
import androidx.fragment.app.Fragment
9+
import com.google.android.material.snackbar.Snackbar
1010

1111
import moe.feng.common.stepperview.VerticalStepperItemView
1212
import moe.feng.common.stepperview.demo.R
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.v4.widget.DrawerLayout
2+
<androidx.drawerlayout.widget.DrawerLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
xmlns:tools="http://schemas.android.com/tools"
@@ -8,37 +8,37 @@
88
android:id="@+id/drawer_layout"
99
tools:context=".MainActivity">
1010

11-
<android.support.design.widget.CoordinatorLayout
11+
<androidx.coordinatorlayout.widget.CoordinatorLayout
1212
android:layout_width="match_parent"
1313
android:layout_height="match_parent">
1414

15-
<android.support.design.widget.AppBarLayout
15+
<com.google.android.material.appbar.AppBarLayout
1616
android:layout_width="match_parent"
1717
android:layout_height="wrap_content"
1818
android:background="?attr/colorPrimary"
1919
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
2020
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
2121

22-
<android.support.v7.widget.Toolbar
22+
<androidx.appcompat.widget.Toolbar
2323
android:id="@+id/toolbar"
2424
android:layout_width="match_parent"
2525
android:layout_height="?attr/actionBarSize"/>
2626

27-
</android.support.design.widget.AppBarLayout>
27+
</com.google.android.material.appbar.AppBarLayout>
2828

2929
<FrameLayout
3030
android:id="@+id/container"
3131
android:layout_width="match_parent"
3232
android:layout_height="match_parent"
3333
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
3434

35-
</android.support.design.widget.CoordinatorLayout>
35+
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3636

37-
<android.support.design.widget.NavigationView
37+
<com.google.android.material.navigation.NavigationView
3838
android:id="@+id/navigation_view"
3939
android:layout_width="280dp"
4040
android:layout_height="match_parent"
4141
android:layout_gravity="start"
4242
app:menu="@menu/navigation_main"/>
4343

44-
</android.support.v4.widget.DrawerLayout>
44+
</androidx.drawerlayout.widget.DrawerLayout>

demo-kotlin/src/main/res/layout/fragment_vertical_stepper.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.v4.widget.NestedScrollView
2+
<androidx.core.widget.NestedScrollView
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
android:layout_width="match_parent"
@@ -179,4 +179,4 @@
179179

180180
</LinearLayout>
181181

182-
</android.support.v4.widget.NestedScrollView>
182+
</androidx.core.widget.NestedScrollView>

demo/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion rootProject.ext.targetSdkVersion
5-
buildToolsVersion rootProject.ext.buildToolsVersion
65

76
defaultConfig {
87
minSdkVersion rootProject.ext.minSdkVersion
@@ -28,9 +27,8 @@ dependencies {
2827
})
2928
testImplementation 'junit:junit:4.12'
3029

31-
implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
32-
implementation "com.android.support:design:$supportLibraryVersion"
33-
implementation "com.android.support:customtabs:$supportLibraryVersion"
30+
implementation 'androidx.appcompat:appcompat:1.1.0'
31+
implementation 'com.google.android.material:material:1.2.0-alpha04'
3432
implementation 'moe.feng:AlipayZeroSdk:1.1'
3533
implementation project(':library')
3634
}

0 commit comments

Comments
 (0)