From 7dc681e6d7689189eee692a84840ad78bbf4cd62 Mon Sep 17 00:00:00 2001 From: HJQ <880634@qq.com> Date: Tue, 7 May 2019 16:41:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8DAndroidX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 14 +++++++------- app/src/main/AndroidManifest.xml | 2 +- .../java/com/hjq/demo/common/MyActivity.java | 6 +++--- .../com/hjq/demo/common/MyApplication.java | 2 +- .../com/hjq/demo/common/MyLazyFragment.java | 8 ++++---- .../com/hjq/demo/common/MyListViewAdapter.java | 8 ++++---- .../hjq/demo/common/MyRecyclerViewAdapter.java | 8 ++++---- .../hjq/demo/helper/ActivityStackManager.java | 2 +- .../com/hjq/demo/helper/IntentExtraUtils.java | 2 +- .../com/hjq/demo/helper/PopupWindowHelper.java | 4 ++-- .../demo/helper/RadioButtonGroupHelper.java | 2 +- .../com/hjq/demo/other/EventBusManager.java | 2 +- .../java/com/hjq/demo/other/StatusManager.java | 8 ++++---- .../hjq/demo/ui/activity/DialogActivity.java | 2 +- .../com/hjq/demo/ui/activity/HomeActivity.java | 6 +++--- .../hjq/demo/ui/activity/LoginActivity.java | 2 +- .../hjq/demo/ui/activity/PhotoActivity.java | 2 +- .../com/hjq/demo/ui/adapter/CopyAdapter.java | 2 +- .../hjq/demo/ui/adapter/PhotoPagerAdapter.java | 4 ++-- .../com/hjq/demo/ui/dialog/CopyDialog.java | 2 +- .../com/hjq/demo/ui/dialog/ShareDialog.java | 10 +++++----- .../com/hjq/demo/ui/dialog/UpdateDialog.java | 4 ++-- .../hjq/demo/ui/fragment/TestFragmentA.java | 4 ++-- .../com/hjq/demo/widget/PhotoViewPager.java | 2 +- .../demo/widget/XCollapsingToolbarLayout.java | 2 +- app/src/main/res/layout/activity_dialog.xml | 4 ++-- app/src/main/res/layout/activity_home.xml | 2 +- app/src/main/res/layout/activity_register.xml | 4 ++-- app/src/main/res/layout/activity_status.xml | 2 +- app/src/main/res/layout/dialog_update.xml | 4 ++-- app/src/main/res/layout/fragment_test_a.xml | 14 +++++++------- app/src/main/res/layout/fragment_test_b.xml | 4 ++-- app/src/main/res/layout/fragment_test_c.xml | 4 ++-- app/src/main/res/layout/fragment_test_d.xml | 4 ++-- base/build.gradle | 4 ++-- .../main/java/com/hjq/base/BaseActivity.java | 4 ++-- .../src/main/java/com/hjq/base/BaseDialog.java | 18 +++++++++--------- .../java/com/hjq/base/BaseDialogFragment.java | 14 +++++++------- .../java/com/hjq/base/BaseFragmentAdapter.java | 10 +++++----- .../java/com/hjq/base/BaseLazyFragment.java | 8 ++++---- .../java/com/hjq/base/BaseListViewAdapter.java | 12 ++++++------ .../com/hjq/base/BaseRecyclerViewAdapter.java | 16 ++++++++-------- dialog/build.gradle | 4 ++-- .../java/com/hjq/dialog/AbsLooperDialog.java | 2 +- .../java/com/hjq/dialog/AddressDialog.java | 8 ++++---- .../main/java/com/hjq/dialog/DateDialog.java | 2 +- .../main/java/com/hjq/dialog/InputDialog.java | 2 +- .../main/java/com/hjq/dialog/MenuDialog.java | 8 ++++---- .../java/com/hjq/dialog/MessageDialog.java | 2 +- .../java/com/hjq/dialog/PayPasswordDialog.java | 8 ++++---- .../main/java/com/hjq/dialog/ToastDialog.java | 2 +- .../main/java/com/hjq/dialog/WaitDialog.java | 2 +- .../hjq/dialog/widget/CircleProgressView.java | 4 ++-- .../com/hjq/dialog/widget/PasswordView.java | 2 +- dialog/src/main/res/layout/dialog_address.xml | 10 +++++----- dialog/src/main/res/layout/dialog_menu.xml | 4 ++-- .../main/res/layout/dialog_pay_password.xml | 4 ++-- gradle.properties | 2 ++ image/build.gradle | 4 ++-- .../main/java/com/hjq/image/GlideHandler.java | 8 ++++---- .../main/java/com/hjq/image/ImageLoader.java | 16 ++++++++-------- umeng/build.gradle | 2 +- .../main/java/com/hjq/umeng/UmengClient.java | 6 +++--- .../main/java/com/hjq/umeng/UmengShare.java | 2 +- widget/build.gradle | 4 ++-- .../java/com/hjq/widget/ClearEditText.java | 8 ++++---- .../java/com/hjq/widget/CountdownView.java | 4 ++-- .../main/java/com/hjq/widget/HintLayout.java | 10 +++++----- .../java/com/hjq/widget/NoScrollViewPager.java | 4 ++-- .../main/java/com/hjq/widget/SimpleLayout.java | 2 +- .../main/java/com/hjq/widget/SwitchButton.java | 4 ++-- .../com/hjq/widget/square/SquareImageView.java | 2 +- .../com/hjq/widget/square/SquareTextView.java | 2 +- 73 files changed, 192 insertions(+), 190 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 693a617c..886e3415 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,7 +17,7 @@ android { targetSdkVersion rootProject.ext.targetSdkVersion versionCode 10 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" // 混淆配置 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-app.pro' @@ -139,14 +139,14 @@ dependencies { // 友盟隔离 implementation project(':umeng') - implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" - implementation "com.android.support:design:$rootProject.ext.supportLibraryVersion" - implementation "com.android.support:support-v4:$rootProject.ext.supportLibraryVersion" - implementation "com.android.support:cardview-v7:$rootProject.ext.supportLibraryVersion" - implementation "com.android.support.constraint:constraint-layout:$rootProject.ext.constraintLayoutVersion" + implementation 'androidx.appcompat:appcompat:1.1.0-alpha04' + implementation 'com.google.android.material:material:1.1.0-alpha06' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'androidx.cardview:cardview:1.0.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha5' // Dex分包,解决 64k 问题 - implementation 'com.android.support:multidex:1.0.3' + implementation 'androidx.multidex:multidex:2.0.1' // ButterKnife 注解库:https://github.com/JakeWharton/butterknife implementation 'com.jakewharton:butterknife:9.0.0-rc1' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b05ebbe1..2a49306c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -30,7 +30,7 @@ diff --git a/app/src/main/java/com/hjq/demo/common/MyActivity.java b/app/src/main/java/com/hjq/demo/common/MyActivity.java index 60fcc052..8ea6db09 100644 --- a/app/src/main/java/com/hjq/demo/common/MyActivity.java +++ b/app/src/main/java/com/hjq/demo/common/MyActivity.java @@ -2,9 +2,9 @@ import android.content.pm.ActivityInfo; import android.graphics.drawable.Drawable; -import android.support.annotation.DrawableRes; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import android.util.Log; import android.view.View; diff --git a/app/src/main/java/com/hjq/demo/common/MyApplication.java b/app/src/main/java/com/hjq/demo/common/MyApplication.java index 3eb9e306..5b750a15 100644 --- a/app/src/main/java/com/hjq/demo/common/MyApplication.java +++ b/app/src/main/java/com/hjq/demo/common/MyApplication.java @@ -2,7 +2,7 @@ import android.app.Application; import android.content.Context; -import android.support.multidex.MultiDex; +import androidx.multidex.MultiDex; import com.hjq.demo.other.EventBusManager; import com.hjq.image.ImageLoader; diff --git a/app/src/main/java/com/hjq/demo/common/MyLazyFragment.java b/app/src/main/java/com/hjq/demo/common/MyLazyFragment.java index e58cc2ac..ec2256a3 100644 --- a/app/src/main/java/com/hjq/demo/common/MyLazyFragment.java +++ b/app/src/main/java/com/hjq/demo/common/MyLazyFragment.java @@ -2,10 +2,10 @@ import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/com/hjq/demo/common/MyListViewAdapter.java b/app/src/main/java/com/hjq/demo/common/MyListViewAdapter.java index 9f628fb1..f7cdffd0 100644 --- a/app/src/main/java/com/hjq/demo/common/MyListViewAdapter.java +++ b/app/src/main/java/com/hjq/demo/common/MyListViewAdapter.java @@ -1,10 +1,10 @@ package com.hjq.demo.common; import android.content.Context; -import android.support.annotation.ColorInt; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.StringRes; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.StringRes; import android.view.View; import android.view.ViewGroup; import android.widget.CompoundButton; diff --git a/app/src/main/java/com/hjq/demo/common/MyRecyclerViewAdapter.java b/app/src/main/java/com/hjq/demo/common/MyRecyclerViewAdapter.java index 70736b54..aac4c020 100644 --- a/app/src/main/java/com/hjq/demo/common/MyRecyclerViewAdapter.java +++ b/app/src/main/java/com/hjq/demo/common/MyRecyclerViewAdapter.java @@ -1,10 +1,10 @@ package com.hjq.demo.common; import android.content.Context; -import android.support.annotation.ColorInt; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.StringRes; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.StringRes; import android.view.View; import android.view.ViewGroup; import android.widget.CompoundButton; diff --git a/app/src/main/java/com/hjq/demo/helper/ActivityStackManager.java b/app/src/main/java/com/hjq/demo/helper/ActivityStackManager.java index 75aa97ad..b113ecc5 100644 --- a/app/src/main/java/com/hjq/demo/helper/ActivityStackManager.java +++ b/app/src/main/java/com/hjq/demo/helper/ActivityStackManager.java @@ -1,7 +1,7 @@ package com.hjq.demo.helper; import android.app.Activity; -import android.support.v4.util.ArrayMap; +import androidx.collection.ArrayMap; /** * author : Android 轮子哥 diff --git a/app/src/main/java/com/hjq/demo/helper/IntentExtraUtils.java b/app/src/main/java/com/hjq/demo/helper/IntentExtraUtils.java index 69a71534..0baa09b5 100644 --- a/app/src/main/java/com/hjq/demo/helper/IntentExtraUtils.java +++ b/app/src/main/java/com/hjq/demo/helper/IntentExtraUtils.java @@ -82,7 +82,7 @@ public IntentExtraUtils startActivity(Fragment fragment, int requestCode) { return this; } - public IntentExtraUtils startActivity(android.support.v4.app.Fragment fragment, int requestCode) { + public IntentExtraUtils startActivity(androidx.fragment.app.Fragment fragment, int requestCode) { fragment.startActivityForResult(new Intent(fragment.getActivity(), sCurrentClass), requestCode); return this; } diff --git a/app/src/main/java/com/hjq/demo/helper/PopupWindowHelper.java b/app/src/main/java/com/hjq/demo/helper/PopupWindowHelper.java index 7a12837f..1a668c25 100644 --- a/app/src/main/java/com/hjq/demo/helper/PopupWindowHelper.java +++ b/app/src/main/java/com/hjq/demo/helper/PopupWindowHelper.java @@ -3,8 +3,8 @@ import android.content.Context; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; diff --git a/app/src/main/java/com/hjq/demo/helper/RadioButtonGroupHelper.java b/app/src/main/java/com/hjq/demo/helper/RadioButtonGroupHelper.java index e6fc1bf5..9c259636 100644 --- a/app/src/main/java/com/hjq/demo/helper/RadioButtonGroupHelper.java +++ b/app/src/main/java/com/hjq/demo/helper/RadioButtonGroupHelper.java @@ -1,6 +1,6 @@ package com.hjq.demo.helper; -import android.support.annotation.IdRes; +import androidx.annotation.IdRes; import android.view.View; import android.widget.CompoundButton; import android.widget.RadioButton; diff --git a/app/src/main/java/com/hjq/demo/other/EventBusManager.java b/app/src/main/java/com/hjq/demo/other/EventBusManager.java index d56b5b1e..4c1b1e43 100644 --- a/app/src/main/java/com/hjq/demo/other/EventBusManager.java +++ b/app/src/main/java/com/hjq/demo/other/EventBusManager.java @@ -1,6 +1,6 @@ package com.hjq.demo.other; -import android.support.v4.util.ArrayMap; +import androidx.collection.ArrayMap; import com.hjq.demo.MyEventBusIndex; diff --git a/app/src/main/java/com/hjq/demo/other/StatusManager.java b/app/src/main/java/com/hjq/demo/other/StatusManager.java index def6db8c..beb17bf7 100644 --- a/app/src/main/java/com/hjq/demo/other/StatusManager.java +++ b/app/src/main/java/com/hjq/demo/other/StatusManager.java @@ -4,10 +4,10 @@ import android.graphics.drawable.Drawable; import android.net.ConnectivityManager; import android.net.NetworkInfo; -import android.support.annotation.DrawableRes; -import android.support.annotation.RequiresPermission; -import android.support.annotation.StringRes; -import android.support.v4.app.FragmentActivity; +import androidx.annotation.DrawableRes; +import androidx.annotation.RequiresPermission; +import androidx.annotation.StringRes; +import androidx.fragment.app.FragmentActivity; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/hjq/demo/ui/activity/DialogActivity.java b/app/src/main/java/com/hjq/demo/ui/activity/DialogActivity.java index fd468845..8ef58cee 100644 --- a/app/src/main/java/com/hjq/demo/ui/activity/DialogActivity.java +++ b/app/src/main/java/com/hjq/demo/ui/activity/DialogActivity.java @@ -3,7 +3,7 @@ import android.app.Dialog; import android.content.Intent; import android.content.pm.PackageManager; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.view.Gravity; import android.view.View; import android.widget.ImageView; diff --git a/app/src/main/java/com/hjq/demo/ui/activity/HomeActivity.java b/app/src/main/java/com/hjq/demo/ui/activity/HomeActivity.java index 84c91db9..0d85ac65 100644 --- a/app/src/main/java/com/hjq/demo/ui/activity/HomeActivity.java +++ b/app/src/main/java/com/hjq/demo/ui/activity/HomeActivity.java @@ -1,8 +1,8 @@ package com.hjq.demo.ui.activity; -import android.support.annotation.NonNull; -import android.support.design.widget.BottomNavigationView; -import android.support.v4.view.ViewPager; +import androidx.annotation.NonNull; +import com.google.android.material.bottomnavigation.BottomNavigationView; +import androidx.viewpager.widget.ViewPager; import android.view.KeyEvent; import android.view.MenuItem; diff --git a/app/src/main/java/com/hjq/demo/ui/activity/LoginActivity.java b/app/src/main/java/com/hjq/demo/ui/activity/LoginActivity.java index c4eaf8b2..07270c05 100644 --- a/app/src/main/java/com/hjq/demo/ui/activity/LoginActivity.java +++ b/app/src/main/java/com/hjq/demo/ui/activity/LoginActivity.java @@ -1,7 +1,7 @@ package com.hjq.demo.ui.activity; import android.content.Intent; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.view.View; import android.widget.Button; import android.widget.EditText; diff --git a/app/src/main/java/com/hjq/demo/ui/activity/PhotoActivity.java b/app/src/main/java/com/hjq/demo/ui/activity/PhotoActivity.java index faf6e70b..ffe08742 100644 --- a/app/src/main/java/com/hjq/demo/ui/activity/PhotoActivity.java +++ b/app/src/main/java/com/hjq/demo/ui/activity/PhotoActivity.java @@ -1,6 +1,6 @@ package com.hjq.demo.ui.activity; -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.ViewPager; import com.hjq.demo.R; import com.hjq.demo.common.MyActivity; diff --git a/app/src/main/java/com/hjq/demo/ui/adapter/CopyAdapter.java b/app/src/main/java/com/hjq/demo/ui/adapter/CopyAdapter.java index 816c8df1..f062d0d3 100644 --- a/app/src/main/java/com/hjq/demo/ui/adapter/CopyAdapter.java +++ b/app/src/main/java/com/hjq/demo/ui/adapter/CopyAdapter.java @@ -1,7 +1,7 @@ package com.hjq.demo.ui.adapter; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.ViewGroup; import com.hjq.demo.R; diff --git a/app/src/main/java/com/hjq/demo/ui/adapter/PhotoPagerAdapter.java b/app/src/main/java/com/hjq/demo/ui/adapter/PhotoPagerAdapter.java index 7840e1de..689a505c 100644 --- a/app/src/main/java/com/hjq/demo/ui/adapter/PhotoPagerAdapter.java +++ b/app/src/main/java/com/hjq/demo/ui/adapter/PhotoPagerAdapter.java @@ -1,8 +1,8 @@ package com.hjq.demo.ui.adapter; import android.app.Activity; -import android.support.annotation.NonNull; -import android.support.v4.view.PagerAdapter; +import androidx.annotation.NonNull; +import androidx.viewpager.widget.PagerAdapter; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/hjq/demo/ui/dialog/CopyDialog.java b/app/src/main/java/com/hjq/demo/ui/dialog/CopyDialog.java index 9f03fd2a..f6f8ca03 100644 --- a/app/src/main/java/com/hjq/demo/ui/dialog/CopyDialog.java +++ b/app/src/main/java/com/hjq/demo/ui/dialog/CopyDialog.java @@ -1,6 +1,6 @@ package com.hjq.demo.ui.dialog; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import android.view.Gravity; import com.hjq.base.BaseDialog; diff --git a/app/src/main/java/com/hjq/demo/ui/dialog/ShareDialog.java b/app/src/main/java/com/hjq/demo/ui/dialog/ShareDialog.java index 874d5ab0..0f6d9f51 100644 --- a/app/src/main/java/com/hjq/demo/ui/dialog/ShareDialog.java +++ b/app/src/main/java/com/hjq/demo/ui/dialog/ShareDialog.java @@ -3,11 +3,11 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentActivity; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentActivity; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.TypedValue; import android.view.Gravity; import android.view.View; diff --git a/app/src/main/java/com/hjq/demo/ui/dialog/UpdateDialog.java b/app/src/main/java/com/hjq/demo/ui/dialog/UpdateDialog.java index 2cdd890f..f93d4732 100644 --- a/app/src/main/java/com/hjq/demo/ui/dialog/UpdateDialog.java +++ b/app/src/main/java/com/hjq/demo/ui/dialog/UpdateDialog.java @@ -11,8 +11,8 @@ import android.os.Handler; import android.os.Looper; import android.os.Message; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.FileProvider; +import androidx.fragment.app.FragmentActivity; +import androidx.core.content.FileProvider; import android.text.format.Formatter; import android.view.Gravity; import android.view.View; diff --git a/app/src/main/java/com/hjq/demo/ui/fragment/TestFragmentA.java b/app/src/main/java/com/hjq/demo/ui/fragment/TestFragmentA.java index a05c18c4..4bcc7416 100644 --- a/app/src/main/java/com/hjq/demo/ui/fragment/TestFragmentA.java +++ b/app/src/main/java/com/hjq/demo/ui/fragment/TestFragmentA.java @@ -1,7 +1,7 @@ package com.hjq.demo.ui.fragment; -import android.support.design.widget.AppBarLayout; -import android.support.v7.widget.Toolbar; +import com.google.android.material.appbar.AppBarLayout; +import androidx.appcompat.widget.Toolbar; import android.widget.TextView; import com.gyf.barlibrary.ImmersionBar; diff --git a/app/src/main/java/com/hjq/demo/widget/PhotoViewPager.java b/app/src/main/java/com/hjq/demo/widget/PhotoViewPager.java index 556f545a..a6906fd3 100644 --- a/app/src/main/java/com/hjq/demo/widget/PhotoViewPager.java +++ b/app/src/main/java/com/hjq/demo/widget/PhotoViewPager.java @@ -1,7 +1,7 @@ package com.hjq.demo.widget; import android.content.Context; -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; diff --git a/app/src/main/java/com/hjq/demo/widget/XCollapsingToolbarLayout.java b/app/src/main/java/com/hjq/demo/widget/XCollapsingToolbarLayout.java index e85ed8e4..af5bb9a2 100644 --- a/app/src/main/java/com/hjq/demo/widget/XCollapsingToolbarLayout.java +++ b/app/src/main/java/com/hjq/demo/widget/XCollapsingToolbarLayout.java @@ -1,7 +1,7 @@ package com.hjq.demo.widget; import android.content.Context; -import android.support.design.widget.CollapsingToolbarLayout; +import com.google.android.material.appbar.CollapsingToolbarLayout; import android.util.AttributeSet; /** diff --git a/app/src/main/res/layout/activity_dialog.xml b/app/src/main/res/layout/activity_dialog.xml index b5c999ce..04043064 100644 --- a/app/src/main/res/layout/activity_dialog.xml +++ b/app/src/main/res/layout/activity_dialog.xml @@ -13,7 +13,7 @@ android:layout_height="wrap_content" app:title="对话框案例" /> - @@ -139,6 +139,6 @@ - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_home.xml b/app/src/main/res/layout/activity_home.xml index 8704eedf..6302e453 100644 --- a/app/src/main/res/layout/activity_home.xml +++ b/app/src/main/res/layout/activity_home.xml @@ -14,7 +14,7 @@ android:layout_weight="1" android:fitsSystemWindows="false" /> - - @@ -122,6 +122,6 @@ - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_status.xml b/app/src/main/res/layout/activity_status.xml index bfdf1ea9..a3e69b95 100644 --- a/app/src/main/res/layout/activity_status.xml +++ b/app/src/main/res/layout/activity_status.xml @@ -17,7 +17,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - + - - - - + - @@ -95,6 +95,6 @@ - + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_test_b.xml b/app/src/main/res/layout/fragment_test_b.xml index cfb51314..83ca1140 100644 --- a/app/src/main/res/layout/fragment_test_b.xml +++ b/app/src/main/res/layout/fragment_test_b.xml @@ -13,7 +13,7 @@ app:backButton="false" app:title="@string/home_nav_found" /> - @@ -214,6 +214,6 @@ - + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_test_c.xml b/app/src/main/res/layout/fragment_test_c.xml index b52d802d..f02ac41f 100644 --- a/app/src/main/res/layout/fragment_test_c.xml +++ b/app/src/main/res/layout/fragment_test_c.xml @@ -13,7 +13,7 @@ app:backButton="false" app:title="@string/home_nav_message" /> - @@ -103,6 +103,6 @@ android:text="关闭界面侧滑" /> - + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_test_d.xml b/app/src/main/res/layout/fragment_test_d.xml index 7cccc3bd..9575ce18 100644 --- a/app/src/main/res/layout/fragment_test_d.xml +++ b/app/src/main/res/layout/fragment_test_d.xml @@ -13,7 +13,7 @@ app:backButton="false" app:title="@string/home_nav_me" /> - @@ -139,6 +139,6 @@ - + \ No newline at end of file diff --git a/base/build.gradle b/base/build.gradle index 98c79855..56841376 100644 --- a/base/build.gradle +++ b/base/build.gradle @@ -13,6 +13,6 @@ android { } dependencies { - implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" - implementation "com.android.support:design:$rootProject.ext.supportLibraryVersion" + implementation 'androidx.appcompat:appcompat:1.1.0-alpha04' + implementation 'com.google.android.material:material:1.1.0-alpha06' } \ No newline at end of file diff --git a/base/src/main/java/com/hjq/base/BaseActivity.java b/base/src/main/java/com/hjq/base/BaseActivity.java index d0ff465e..273e3931 100644 --- a/base/src/main/java/com/hjq/base/BaseActivity.java +++ b/base/src/main/java/com/hjq/base/BaseActivity.java @@ -7,8 +7,8 @@ import android.os.Handler; import android.os.Looper; import android.os.SystemClock; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.view.inputmethod.InputMethodManager; diff --git a/base/src/main/java/com/hjq/base/BaseDialog.java b/base/src/main/java/com/hjq/base/BaseDialog.java index 423d6118..1634d948 100644 --- a/base/src/main/java/com/hjq/base/BaseDialog.java +++ b/base/src/main/java/com/hjq/base/BaseDialog.java @@ -8,15 +8,15 @@ import android.os.Handler; import android.os.Looper; import android.os.SystemClock; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.annotation.StyleRes; -import android.support.v7.app.AppCompatDialog; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.annotation.StyleRes; +import androidx.appcompat.app.AppCompatDialog; import android.util.SparseArray; import android.util.SparseIntArray; import android.view.Gravity; diff --git a/base/src/main/java/com/hjq/base/BaseDialogFragment.java b/base/src/main/java/com/hjq/base/BaseDialogFragment.java index 4ed79e15..50eba6ec 100644 --- a/base/src/main/java/com/hjq/base/BaseDialogFragment.java +++ b/base/src/main/java/com/hjq/base/BaseDialogFragment.java @@ -3,13 +3,13 @@ import android.app.Dialog; import android.os.Bundle; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; /** * author : Android 轮子哥 diff --git a/base/src/main/java/com/hjq/base/BaseFragmentAdapter.java b/base/src/main/java/com/hjq/base/BaseFragmentAdapter.java index 62f5b684..baa9ef79 100644 --- a/base/src/main/java/com/hjq/base/BaseFragmentAdapter.java +++ b/base/src/main/java/com/hjq/base/BaseFragmentAdapter.java @@ -1,10 +1,10 @@ package com.hjq.base; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; import android.view.ViewGroup; import java.util.ArrayList; diff --git a/base/src/main/java/com/hjq/base/BaseLazyFragment.java b/base/src/main/java/com/hjq/base/BaseLazyFragment.java index b8d38fac..9c56ea27 100644 --- a/base/src/main/java/com/hjq/base/BaseLazyFragment.java +++ b/base/src/main/java/com/hjq/base/BaseLazyFragment.java @@ -4,10 +4,10 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; diff --git a/base/src/main/java/com/hjq/base/BaseListViewAdapter.java b/base/src/main/java/com/hjq/base/BaseListViewAdapter.java index 7f6290d8..ce979612 100644 --- a/base/src/main/java/com/hjq/base/BaseListViewAdapter.java +++ b/base/src/main/java/com/hjq/base/BaseListViewAdapter.java @@ -4,12 +4,12 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import android.util.SparseArray; import android.view.LayoutInflater; import android.view.View; diff --git a/base/src/main/java/com/hjq/base/BaseRecyclerViewAdapter.java b/base/src/main/java/com/hjq/base/BaseRecyclerViewAdapter.java index c4ac3521..fb2a0d55 100644 --- a/base/src/main/java/com/hjq/base/BaseRecyclerViewAdapter.java +++ b/base/src/main/java/com/hjq/base/BaseRecyclerViewAdapter.java @@ -4,14 +4,14 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.SparseArray; import android.view.LayoutInflater; import android.view.View; diff --git a/dialog/build.gradle b/dialog/build.gradle index 7de94654..06851d21 100644 --- a/dialog/build.gradle +++ b/dialog/build.gradle @@ -13,8 +13,8 @@ android { } dependencies { - implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" - implementation "com.android.support:design:$rootProject.ext.supportLibraryVersion" + implementation 'androidx.appcompat:appcompat:1.1.0-alpha04' + implementation 'com.google.android.material:material:1.1.0-alpha06' // 基础库(不包任何第三方框架) implementation project(':base') } \ No newline at end of file diff --git a/dialog/src/main/java/com/hjq/dialog/AbsLooperDialog.java b/dialog/src/main/java/com/hjq/dialog/AbsLooperDialog.java index a0e5dbc2..9d273839 100644 --- a/dialog/src/main/java/com/hjq/dialog/AbsLooperDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/AbsLooperDialog.java @@ -1,7 +1,7 @@ package com.hjq.dialog; import android.content.Context; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import android.util.DisplayMetrics; import android.view.Gravity; import android.view.View; diff --git a/dialog/src/main/java/com/hjq/dialog/AddressDialog.java b/dialog/src/main/java/com/hjq/dialog/AddressDialog.java index daa0ad73..3363f2db 100644 --- a/dialog/src/main/java/com/hjq/dialog/AddressDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/AddressDialog.java @@ -3,10 +3,10 @@ import android.app.Dialog; import android.content.Context; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.design.widget.TabLayout; -import android.support.v4.app.FragmentActivity; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.FragmentActivity; +import androidx.recyclerview.widget.RecyclerView; import android.util.DisplayMetrics; import android.util.TypedValue; import android.view.Gravity; diff --git a/dialog/src/main/java/com/hjq/dialog/DateDialog.java b/dialog/src/main/java/com/hjq/dialog/DateDialog.java index 76590613..c5628259 100644 --- a/dialog/src/main/java/com/hjq/dialog/DateDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/DateDialog.java @@ -1,7 +1,7 @@ package com.hjq.dialog; import android.app.Dialog; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import com.hjq.dialog.widget.LoopView; diff --git a/dialog/src/main/java/com/hjq/dialog/InputDialog.java b/dialog/src/main/java/com/hjq/dialog/InputDialog.java index e8fb832f..579c4649 100644 --- a/dialog/src/main/java/com/hjq/dialog/InputDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/InputDialog.java @@ -2,7 +2,7 @@ import android.app.Dialog; import android.content.Context; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import android.view.Gravity; import android.view.View; import android.view.inputmethod.InputMethodManager; diff --git a/dialog/src/main/java/com/hjq/dialog/MenuDialog.java b/dialog/src/main/java/com/hjq/dialog/MenuDialog.java index a7adf3e6..62a4ace6 100644 --- a/dialog/src/main/java/com/hjq/dialog/MenuDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/MenuDialog.java @@ -2,10 +2,10 @@ import android.app.Dialog; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentActivity; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; diff --git a/dialog/src/main/java/com/hjq/dialog/MessageDialog.java b/dialog/src/main/java/com/hjq/dialog/MessageDialog.java index 49c0e4d6..dc45c14c 100644 --- a/dialog/src/main/java/com/hjq/dialog/MessageDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/MessageDialog.java @@ -1,7 +1,7 @@ package com.hjq.dialog; import android.app.Dialog; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import android.view.Gravity; import android.view.View; import android.widget.TextView; diff --git a/dialog/src/main/java/com/hjq/dialog/PayPasswordDialog.java b/dialog/src/main/java/com/hjq/dialog/PayPasswordDialog.java index 90558a16..90551bb1 100644 --- a/dialog/src/main/java/com/hjq/dialog/PayPasswordDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/PayPasswordDialog.java @@ -2,10 +2,10 @@ import android.app.Dialog; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentActivity; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentActivity; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; diff --git a/dialog/src/main/java/com/hjq/dialog/ToastDialog.java b/dialog/src/main/java/com/hjq/dialog/ToastDialog.java index ee67cd1a..4a2a3d9e 100644 --- a/dialog/src/main/java/com/hjq/dialog/ToastDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/ToastDialog.java @@ -1,6 +1,6 @@ package com.hjq.dialog; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import android.view.Gravity; import android.widget.ImageView; import android.widget.TextView; diff --git a/dialog/src/main/java/com/hjq/dialog/WaitDialog.java b/dialog/src/main/java/com/hjq/dialog/WaitDialog.java index 16a8db1e..8be9d959 100644 --- a/dialog/src/main/java/com/hjq/dialog/WaitDialog.java +++ b/dialog/src/main/java/com/hjq/dialog/WaitDialog.java @@ -1,6 +1,6 @@ package com.hjq.dialog; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import android.view.Gravity; import android.view.View; import android.widget.TextView; diff --git a/dialog/src/main/java/com/hjq/dialog/widget/CircleProgressView.java b/dialog/src/main/java/com/hjq/dialog/widget/CircleProgressView.java index 90855213..3ba169af 100644 --- a/dialog/src/main/java/com/hjq/dialog/widget/CircleProgressView.java +++ b/dialog/src/main/java/com/hjq/dialog/widget/CircleProgressView.java @@ -15,8 +15,8 @@ import android.graphics.drawable.Drawable; import android.os.Build; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.util.AttributeSet; import android.util.TypedValue; import android.view.View; diff --git a/dialog/src/main/java/com/hjq/dialog/widget/PasswordView.java b/dialog/src/main/java/com/hjq/dialog/widget/PasswordView.java index 25de945d..37c8cdd8 100644 --- a/dialog/src/main/java/com/hjq/dialog/widget/PasswordView.java +++ b/dialog/src/main/java/com/hjq/dialog/widget/PasswordView.java @@ -4,7 +4,7 @@ import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Path; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.AttributeSet; import android.util.TypedValue; import android.view.View; diff --git a/dialog/src/main/res/layout/dialog_address.xml b/dialog/src/main/res/layout/dialog_address.xml index 308945ac..8b42e562 100644 --- a/dialog/src/main/res/layout/dialog_address.xml +++ b/dialog/src/main/res/layout/dialog_address.xml @@ -38,7 +38,7 @@ android:layout_height="1px" android:background="#ececec" /> - - - - - - - diff --git a/gradle.properties b/gradle.properties index 3530b010..e648c5aa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,8 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. diff --git a/image/build.gradle b/image/build.gradle index 22124675..87adefc0 100644 --- a/image/build.gradle +++ b/image/build.gradle @@ -15,8 +15,8 @@ android { } dependencies { - implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" - implementation "com.android.support:design:$rootProject.ext.supportLibraryVersion" + implementation 'androidx.appcompat:appcompat:1.1.0-alpha04' + implementation 'com.google.android.material:material:1.1.0-alpha06' implementation 'com.github.bumptech.glide:glide:4.9.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' } \ No newline at end of file diff --git a/image/src/main/java/com/hjq/image/GlideHandler.java b/image/src/main/java/com/hjq/image/GlideHandler.java index 62b7e4bc..96dba2de 100644 --- a/image/src/main/java/com/hjq/image/GlideHandler.java +++ b/image/src/main/java/com/hjq/image/GlideHandler.java @@ -9,8 +9,8 @@ import android.graphics.Paint; import android.graphics.RectF; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.v4.app.FragmentActivity; +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentActivity; import android.widget.ImageView; import com.bumptech.glide.Glide; @@ -112,8 +112,8 @@ private RequestManager getGlide(Object object) { } } else if (object instanceof Fragment) { return Glide.with((Fragment) object); - }else if (object instanceof android.support.v4.app.Fragment) { - return Glide.with((android.support.v4.app.Fragment) object); + }else if (object instanceof androidx.fragment.app.Fragment) { + return Glide.with((androidx.fragment.app.Fragment) object); } // 直接抛出异常 throw new IllegalArgumentException("This object is illegal"); diff --git a/image/src/main/java/com/hjq/image/ImageLoader.java b/image/src/main/java/com/hjq/image/ImageLoader.java index a2fd612b..096e025c 100644 --- a/image/src/main/java/com/hjq/image/ImageLoader.java +++ b/image/src/main/java/com/hjq/image/ImageLoader.java @@ -3,8 +3,8 @@ import android.app.Application; import android.app.Fragment; import android.content.Context; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; import android.widget.ImageView; /** @@ -55,7 +55,7 @@ public static void loadImage(@NonNull Context context, @NonNull ImageView imageV public static void loadImage(Fragment fragment, @NonNull ImageView imageView, String url) { sImageHandler.loadImage(fragment, imageView, url); } - public static void loadImage(android.support.v4.app.Fragment fragment, @NonNull ImageView imageView, String url) { + public static void loadImage(androidx.fragment.app.Fragment fragment, @NonNull ImageView imageView, String url) { sImageHandler.loadImage(fragment, imageView, url); } @@ -68,7 +68,7 @@ public static void loadImage(@NonNull Context context, @NonNull ImageView imageV public static void loadImage(Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId) { sImageHandler.loadImage(fragment, imageView, resourceId); } - public static void loadImage(android.support.v4.app.Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId) { + public static void loadImage(androidx.fragment.app.Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId) { sImageHandler.loadImage(fragment, imageView, resourceId); } @@ -85,7 +85,7 @@ public static void loadCircleImage(@NonNull Context context, @NonNull ImageView public static void loadCircleImage(Fragment fragment, @NonNull ImageView imageView, String url) { sImageHandler.loadCircleImage(fragment, imageView, url); } - public static void loadCircleImage(android.support.v4.app.Fragment fragment, @NonNull ImageView imageView, String url) { + public static void loadCircleImage(androidx.fragment.app.Fragment fragment, @NonNull ImageView imageView, String url) { sImageHandler.loadCircleImage(fragment, imageView, url); } @@ -98,7 +98,7 @@ public static void loadCircleImage(@NonNull Context context, @NonNull ImageView public static void loadCircleImage(Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId) { sImageHandler.loadCircleImage(fragment, imageView, resourceId); } - public static void loadCircleImage(android.support.v4.app.Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId) { + public static void loadCircleImage(androidx.fragment.app.Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId) { sImageHandler.loadCircleImage(fragment, imageView, resourceId); } @@ -115,7 +115,7 @@ public static void loadRoundImage(@NonNull Context context, @NonNull ImageView i public static void loadRoundImage(Fragment fragment, @NonNull ImageView imageView, String url, float radius) { sImageHandler.loadRoundImage(fragment, imageView, url, radius); } - public static void loadRoundImage(android.support.v4.app.Fragment fragment, @NonNull ImageView imageView, String url, float radius) { + public static void loadRoundImage(androidx.fragment.app.Fragment fragment, @NonNull ImageView imageView, String url, float radius) { sImageHandler.loadRoundImage(fragment, imageView, url, radius); } @@ -128,7 +128,7 @@ public static void loadRoundImage(@NonNull Context context, @NonNull ImageView i public static void loadRoundImage(Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId, float radius) { sImageHandler.loadRoundImage(fragment, imageView, resourceId, radius); } - public static void loadRoundImage(android.support.v4.app.Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId, float radius) { + public static void loadRoundImage(androidx.fragment.app.Fragment fragment, @NonNull ImageView imageView, @DrawableRes int resourceId, float radius) { sImageHandler.loadRoundImage(fragment, imageView, resourceId, radius); } } \ No newline at end of file diff --git a/umeng/build.gradle b/umeng/build.gradle index 28488761..43351c35 100644 --- a/umeng/build.gradle +++ b/umeng/build.gradle @@ -17,5 +17,5 @@ android { dependencies { // 依赖 libs 目录下所有 Jar 包 implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" + implementation 'androidx.appcompat:appcompat:1.1.0-alpha04' } \ No newline at end of file diff --git a/umeng/src/main/java/com/hjq/umeng/UmengClient.java b/umeng/src/main/java/com/hjq/umeng/UmengClient.java index 3b6966da..781f4bfd 100644 --- a/umeng/src/main/java/com/hjq/umeng/UmengClient.java +++ b/umeng/src/main/java/com/hjq/umeng/UmengClient.java @@ -6,9 +6,9 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import com.umeng.analytics.MobclickAgent; import com.umeng.commonsdk.UMConfigure; diff --git a/umeng/src/main/java/com/hjq/umeng/UmengShare.java b/umeng/src/main/java/com/hjq/umeng/UmengShare.java index 5ae8a941..aa22cb10 100644 --- a/umeng/src/main/java/com/hjq/umeng/UmengShare.java +++ b/umeng/src/main/java/com/hjq/umeng/UmengShare.java @@ -1,7 +1,7 @@ package com.hjq.umeng; import android.content.Context; -import android.support.annotation.DrawableRes; +import androidx.annotation.DrawableRes; import com.umeng.socialize.UMShareListener; import com.umeng.socialize.bean.SHARE_MEDIA; diff --git a/widget/build.gradle b/widget/build.gradle index aa7014ab..738bb595 100644 --- a/widget/build.gradle +++ b/widget/build.gradle @@ -13,8 +13,8 @@ android { } dependencies { - implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" - implementation "com.android.support:design:$rootProject.ext.supportLibraryVersion" + implementation 'androidx.appcompat:appcompat:1.1.0-alpha04' + implementation 'com.google.android.material:material:1.1.0-alpha06' // 基础库(不包任何第三方框架) implementation project(':base') } \ No newline at end of file diff --git a/widget/src/main/java/com/hjq/widget/ClearEditText.java b/widget/src/main/java/com/hjq/widget/ClearEditText.java index 427d3cf1..5d7a3082 100644 --- a/widget/src/main/java/com/hjq/widget/ClearEditText.java +++ b/widget/src/main/java/com/hjq/widget/ClearEditText.java @@ -4,10 +4,10 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; import android.text.Editable; import android.text.TextWatcher; import android.util.AttributeSet; diff --git a/widget/src/main/java/com/hjq/widget/CountdownView.java b/widget/src/main/java/com/hjq/widget/CountdownView.java index 95f1b428..b0d8325b 100644 --- a/widget/src/main/java/com/hjq/widget/CountdownView.java +++ b/widget/src/main/java/com/hjq/widget/CountdownView.java @@ -3,8 +3,8 @@ import android.annotation.SuppressLint; import android.content.Context; import android.os.Build; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import android.util.AttributeSet; import android.widget.TextView; diff --git a/widget/src/main/java/com/hjq/widget/HintLayout.java b/widget/src/main/java/com/hjq/widget/HintLayout.java index 4738bd7a..3c3f8cd3 100644 --- a/widget/src/main/java/com/hjq/widget/HintLayout.java +++ b/widget/src/main/java/com/hjq/widget/HintLayout.java @@ -4,11 +4,11 @@ import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.AttrRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; +import androidx.annotation.AttrRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.MotionEvent; diff --git a/widget/src/main/java/com/hjq/widget/NoScrollViewPager.java b/widget/src/main/java/com/hjq/widget/NoScrollViewPager.java index 7709a519..76527185 100644 --- a/widget/src/main/java/com/hjq/widget/NoScrollViewPager.java +++ b/widget/src/main/java/com/hjq/widget/NoScrollViewPager.java @@ -2,8 +2,8 @@ import android.annotation.SuppressLint; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v4.view.ViewPager; +import androidx.annotation.NonNull; +import androidx.viewpager.widget.ViewPager; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.MotionEvent; diff --git a/widget/src/main/java/com/hjq/widget/SimpleLayout.java b/widget/src/main/java/com/hjq/widget/SimpleLayout.java index 1197a034..5ea39845 100644 --- a/widget/src/main/java/com/hjq/widget/SimpleLayout.java +++ b/widget/src/main/java/com/hjq/widget/SimpleLayout.java @@ -2,7 +2,7 @@ import android.content.Context; import android.os.Build; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; diff --git a/widget/src/main/java/com/hjq/widget/SwitchButton.java b/widget/src/main/java/com/hjq/widget/SwitchButton.java index c66f1731..db84d991 100644 --- a/widget/src/main/java/com/hjq/widget/SwitchButton.java +++ b/widget/src/main/java/com/hjq/widget/SwitchButton.java @@ -13,8 +13,8 @@ import android.os.Build; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import android.util.AttributeSet; import android.util.TypedValue; import android.view.MotionEvent; diff --git a/widget/src/main/java/com/hjq/widget/square/SquareImageView.java b/widget/src/main/java/com/hjq/widget/square/SquareImageView.java index 22d3a039..8b4cc143 100644 --- a/widget/src/main/java/com/hjq/widget/square/SquareImageView.java +++ b/widget/src/main/java/com/hjq/widget/square/SquareImageView.java @@ -1,7 +1,7 @@ package com.hjq.widget.square; import android.content.Context; -import android.support.v7.widget.AppCompatImageView; +import androidx.appcompat.widget.AppCompatImageView; import android.util.AttributeSet; /** diff --git a/widget/src/main/java/com/hjq/widget/square/SquareTextView.java b/widget/src/main/java/com/hjq/widget/square/SquareTextView.java index 0672b054..d7255c4d 100644 --- a/widget/src/main/java/com/hjq/widget/square/SquareTextView.java +++ b/widget/src/main/java/com/hjq/widget/square/SquareTextView.java @@ -1,7 +1,7 @@ package com.hjq.widget.square; import android.content.Context; -import android.support.v7.widget.AppCompatTextView; +import androidx.appcompat.widget.AppCompatTextView; import android.util.AttributeSet; /**