From 19b98f99f5fb302863d96485d592974f00878cc7 Mon Sep 17 00:00:00 2001
From: endian11 <Dana_Lee1016@126.com>
Date: 星期一, 25 十一月 2019 16:17:04 +0800
Subject: [PATCH] 修复点击设置崩溃;所有support包转成androidx

---
 app/src/main/res/layout/activity_main.xml       |    4 ++--
 app/src/main/res/layout/layout_base_set.xml     |   14 +++++++-------
 app/src/main/res/layout/layout_pwd_fragment.xml |    4 ++--
 app/src/main/res/layout/toolbar.xml             |    6 +++---
 app/src/main/res/layout/layout_base_datas.xml   |    4 ++--
 gradle.properties                               |    3 ++-
 6 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 608b72c..6f8b170 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
@@ -12,4 +12,4 @@
         android:layout_marginBottom="@dimen/bottombar_height"
         android:layout_height="match_parent"/>
 
-</android.support.constraint.ConstraintLayout>
\ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_base_datas.xml b/app/src/main/res/layout/layout_base_datas.xml
index 74a5935..5ae08d7 100644
--- a/app/src/main/res/layout/layout_base_datas.xml
+++ b/app/src/main/res/layout/layout_base_datas.xml
@@ -64,7 +64,7 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="15dp"
                         android:text="涓绘澘锛�"/>
-                    <android.support.v7.widget.AppCompatSpinner
+                    <androidx.appcompat.widget.AppCompatSpinner
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:entries="@array/spinnerarr"
@@ -100,7 +100,7 @@
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="15dp"
                         android:text="鍓澘锛�"/>
-                    <android.support.v7.widget.AppCompatSpinner
+                    <androidx.appcompat.widget.AppCompatSpinner
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:entries="@array/spinnerarr"/>
diff --git a/app/src/main/res/layout/layout_base_set.xml b/app/src/main/res/layout/layout_base_set.xml
index 87b41b9..bdd45cd 100644
--- a/app/src/main/res/layout/layout_base_set.xml
+++ b/app/src/main/res/layout/layout_base_set.xml
@@ -3,14 +3,14 @@
     xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
-    <android.support.design.widget.AppBarLayout
+    <com.google.android.material.appbar.AppBarLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:app="http://schemas.android.com/apk/res-auto"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:theme="@style/AppTheme.AppBarOverlay">
 
-        <android.support.v7.widget.Toolbar
+        <androidx.appcompat.widget.Toolbar
             android:id="@+id/toolbar"
             android:layout_width="match_parent"
             android:layout_height="?attr/actionBarSize"
@@ -18,20 +18,20 @@
             android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
             app:popupTheme="@style/AppTheme.NoActionBar.PopupOverlay"
             app:titleTextAppearance="@style/Toolbar_TextAppearance_White"/>
-        <android.support.design.widget.TabLayout
+        <com.google.android.material.tabs.TabLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:id="@+id/tab_base_set"
 
             android:background="@color/profile_bg"
             android:layout_below="@+id/toolbar_set">
-        </android.support.design.widget.TabLayout>
-    </android.support.design.widget.AppBarLayout>
-    <android.support.v4.view.ViewPager
+        </com.google.android.material.tabs.TabLayout>
+    </com.google.android.material.appbar.AppBarLayout>
+    <androidx.viewpager.widget.ViewPager
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@color/train_bg"
         android:id="@+id/vp_base_set">
 
-    </android.support.v4.view.ViewPager>
+    </androidx.viewpager.widget.ViewPager>
 </LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_pwd_fragment.xml b/app/src/main/res/layout/layout_pwd_fragment.xml
index b66d48f..9af6c46 100644
--- a/app/src/main/res/layout/layout_pwd_fragment.xml
+++ b/app/src/main/res/layout/layout_pwd_fragment.xml
@@ -13,7 +13,7 @@
     android:background="@color/train_bg"
     android:layout_gravity="center"
     android:padding="10dp">
-<android.support.design.widget.TextInputLayout
+<com.google.android.material.textfield.TextInputLayout
     android:layout_width="match_parent"
     app:counterMaxLength="8"
     app:counterEnabled="true"
@@ -26,7 +26,7 @@
     android:id="@+id/et_pwd"
     android:inputType="textPassword"
     android:layout_height="50dp" />
-</android.support.design.widget.TextInputLayout>
+</com.google.android.material.textfield.TextInputLayout>
 <Button
     android:layout_marginTop="20dp"
     android:layout_marginStart="20dp"
diff --git a/app/src/main/res/layout/toolbar.xml b/app/src/main/res/layout/toolbar.xml
index 416ccc4..ab01cf4 100644
--- a/app/src/main/res/layout/toolbar.xml
+++ b/app/src/main/res/layout/toolbar.xml
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 
-<android.support.design.widget.AppBarLayout
+<com.google.android.material.appbar.AppBarLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:theme="@style/AppTheme.AppBarOverlay">
 
-    <android.support.v7.widget.Toolbar
+    <androidx.appcompat.widget.Toolbar
         android:id="@+id/toolbar"
         android:layout_width="match_parent"
         android:layout_height="?attr/actionBarSize"
@@ -15,4 +15,4 @@
         android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
         app:popupTheme="@style/AppTheme.NoActionBar.PopupOverlay"
         app:titleTextAppearance="@style/Toolbar_TextAppearance_White"/>
-</android.support.design.widget.AppBarLayout>
\ No newline at end of file
+</com.google.android.material.appbar.AppBarLayout>
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 82618ce..5cd40bd 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -11,5 +11,6 @@
 # This option should only be used with decoupled projects. More details, visit
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
 # org.gradle.parallel=true
-
+android.useAndroidX=true
+android.enableJetifier=true
 

--
Gitblit v1.8.0