diff --git a/README.md b/README.md index f85e87f5..e5997942 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ allprojects { ``` dependencies { ... - implementation 'com.github.xuexiangjys:XUI:1.0.4' + implementation 'com.github.xuexiangjys:XUI:1.0.5' implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:recyclerview-v7:28.0.0' @@ -171,7 +171,7 @@ protected void attachBaseContext(Context newBase) { ![](https://github.com/xuexiangjys/XPage/blob/master/img/qq_group.jpg) -[xuisvg]: https://img.shields.io/badge/XUI-v1.0.4-brightgreen.svg +[xuisvg]: https://img.shields.io/badge/XUI-v1.0.5-brightgreen.svg [xui]: https://github.com/xuexiangjys/XUI [apisvg]: https://img.shields.io/badge/API-17+-brightgreen.svg [api]: https://android-arsenal.com/api?level=17 \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 54dd8ad5..28493292 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,9 +10,9 @@ android { applicationId "com.xuexiang.xuidemo" minSdkVersion 17 targetSdkVersion build_versions.target_sdk - versionCode 5 - versionName "1.0.4" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + versionCode 6 + versionName "1.0.5" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true vectorDrawables.useSupportLibrary = true @@ -67,6 +67,11 @@ android { jniLibs.srcDirs = ['libs'] } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } dependencies { @@ -75,21 +80,20 @@ dependencies { androidTestImplementation deps.runner androidTestImplementation deps.espresso.core - implementation 'com.android.support:multidex:1.0.3' + implementation deps.androidx.multidex //下拉刷新、CityPicker、XUI框架需要 - implementation deps.support.app_compat - implementation deps.support.recyclerview - implementation deps.support.design + implementation deps.androidx.appcompat + implementation deps.androidx.recyclerview + implementation deps.androidx.design //悬浮按钮 implementation 'com.github.clans:fab:1.6.4' //XUI框架 -// implementation project(':xui_lib') - implementation 'com.github.xuexiangjys:XUI:1.0.4' - implementation 'com.github.bumptech.glide:glide:4.8.0' - + implementation project(':xui_lib') + implementation deps.glide +// implementation 'com.github.xuexiangjys:XUI:1.0.4' // implementation 'com.qmuiteam:qmui:1.2.0' //工具类 diff --git a/app/libs/BaiduLBS_Android.jar b/app/libs/BaiduLBS_Android.jar index 648fc9ed..6227fdcc 100644 Binary files a/app/libs/BaiduLBS_Android.jar and b/app/libs/BaiduLBS_Android.jar differ diff --git a/app/src/main/java/com/xuexiang/xuidemo/DemoDataProvider.java b/app/src/main/java/com/xuexiang/xuidemo/DemoDataProvider.java index c7d6097b..bf38d2cd 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/DemoDataProvider.java +++ b/app/src/main/java/com/xuexiang/xuidemo/DemoDataProvider.java @@ -1,6 +1,6 @@ package com.xuexiang.xuidemo; -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.ViewPager; import com.xuexiang.xaop.annotation.MemoryCache; import com.xuexiang.xui.adapter.simple.AdapterItem; diff --git a/app/src/main/java/com/xuexiang/xuidemo/MyApp.java b/app/src/main/java/com/xuexiang/xuidemo/MyApp.java index 4366d7c9..f8fcb9d3 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/MyApp.java +++ b/app/src/main/java/com/xuexiang/xuidemo/MyApp.java @@ -2,7 +2,8 @@ import android.app.Application; import android.content.Context; -import android.support.multidex.MultiDex; + +import androidx.multidex.MultiDex; import com.xuexiang.xaop.XAOP; import com.xuexiang.xaop.util.PermissionUtils; diff --git a/app/src/main/java/com/xuexiang/xuidemo/activity/EasyIndicatorActivity.java b/app/src/main/java/com/xuexiang/xuidemo/activity/EasyIndicatorActivity.java index 7fc6f2aa..773eddb7 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/activity/EasyIndicatorActivity.java +++ b/app/src/main/java/com/xuexiang/xuidemo/activity/EasyIndicatorActivity.java @@ -17,9 +17,10 @@ package com.xuexiang.xuidemo.activity; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.viewpager.widget.ViewPager; import com.xuexiang.xui.adapter.FragmentAdapter; import com.xuexiang.xui.widget.tabbar.EasyIndicator; diff --git a/app/src/main/java/com/xuexiang/xuidemo/activity/MainActivity.java b/app/src/main/java/com/xuexiang/xuidemo/activity/MainActivity.java index 33b603a9..9036f465 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/activity/MainActivity.java +++ b/app/src/main/java/com/xuexiang/xuidemo/activity/MainActivity.java @@ -4,16 +4,16 @@ import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.LinearLayout; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.tabs.TabLayout; import com.xuexiang.xui.utils.ResUtils; import com.xuexiang.xui.utils.ThemeUtils; -import com.xuexiang.xui.utils.ViewUtils; import com.xuexiang.xui.widget.dialog.DialogLoader; import com.xuexiang.xuidemo.R; import com.xuexiang.xuidemo.adapter.menu.DrawerAdapter; diff --git a/app/src/main/java/com/xuexiang/xuidemo/activity/SearchViewActivity.java b/app/src/main/java/com/xuexiang/xuidemo/activity/SearchViewActivity.java index ab5fd253..a208ef11 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/activity/SearchViewActivity.java +++ b/app/src/main/java/com/xuexiang/xuidemo/activity/SearchViewActivity.java @@ -19,8 +19,8 @@ import android.content.Intent; import android.os.Bundle; import android.speech.RecognizerIntent; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.text.TextUtils; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/com/xuexiang/xuidemo/activity/SettingsActivity.java b/app/src/main/java/com/xuexiang/xuidemo/activity/SettingsActivity.java index f2acf53b..2efbdeb2 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/activity/SettingsActivity.java +++ b/app/src/main/java/com/xuexiang/xuidemo/activity/SettingsActivity.java @@ -25,10 +25,11 @@ import android.preference.Preference; import android.preference.PreferenceManager; import android.preference.RingtonePreference; -import android.support.v7.app.ActionBar; import android.text.TextUtils; import android.view.MenuItem; +import androidx.appcompat.app.ActionBar; + import com.xuexiang.xuidemo.R; import com.xuexiang.xuidemo.base.AppCompatPreferenceActivity; import com.xuexiang.xutil.tip.ToastUtils; diff --git a/app/src/main/java/com/xuexiang/xuidemo/activity/TranslucentActivity.java b/app/src/main/java/com/xuexiang/xuidemo/activity/TranslucentActivity.java index feb16901..fc033531 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/activity/TranslucentActivity.java +++ b/app/src/main/java/com/xuexiang/xuidemo/activity/TranslucentActivity.java @@ -1,8 +1,8 @@ package com.xuexiang.xuidemo.activity; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; import com.xuexiang.xui.utils.StatusBarUtils; import com.xuexiang.xui.widget.banner.widget.banner.SimpleImageBanner; diff --git a/app/src/main/java/com/xuexiang/xuidemo/adapter/CommonRecyclerViewAdapter.java b/app/src/main/java/com/xuexiang/xuidemo/adapter/CommonRecyclerViewAdapter.java index 504abb7f..e6acab87 100755 --- a/app/src/main/java/com/xuexiang/xuidemo/adapter/CommonRecyclerViewAdapter.java +++ b/app/src/main/java/com/xuexiang/xuidemo/adapter/CommonRecyclerViewAdapter.java @@ -16,7 +16,7 @@ package com.xuexiang.xuidemo.adapter; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/xuexiang/xuidemo/adapter/NineGridRecycleAdapter.java b/app/src/main/java/com/xuexiang/xuidemo/adapter/NineGridRecycleAdapter.java index 7fd70d24..4b003249 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/adapter/NineGridRecycleAdapter.java +++ b/app/src/main/java/com/xuexiang/xuidemo/adapter/NineGridRecycleAdapter.java @@ -19,8 +19,8 @@ import android.app.Activity; import android.content.Context; import android.graphics.Rect; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; diff --git a/app/src/main/java/com/xuexiang/xuidemo/adapter/base/BaseRecyclerAdapter.java b/app/src/main/java/com/xuexiang/xuidemo/adapter/base/BaseRecyclerAdapter.java index 00127f0e..72a4a108 100755 --- a/app/src/main/java/com/xuexiang/xuidemo/adapter/base/BaseRecyclerAdapter.java +++ b/app/src/main/java/com/xuexiang/xuidemo/adapter/base/BaseRecyclerAdapter.java @@ -1,7 +1,7 @@ package com.xuexiang.xuidemo.adapter.base; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/xuexiang/xuidemo/adapter/base/BroccoliRecyclerAdapter.java b/app/src/main/java/com/xuexiang/xuidemo/adapter/base/BroccoliRecyclerAdapter.java index dbda5ec4..ca7dd94d 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/adapter/base/BroccoliRecyclerAdapter.java +++ b/app/src/main/java/com/xuexiang/xuidemo/adapter/base/BroccoliRecyclerAdapter.java @@ -1,6 +1,6 @@ package com.xuexiang.xuidemo.adapter.base; -import android.support.annotation.LayoutRes; +import androidx.annotation.LayoutRes; import android.view.View; import com.scwang.smartrefresh.layout.adapter.SmartRecyclerAdapter; diff --git a/app/src/main/java/com/xuexiang/xuidemo/adapter/base/RecyclerViewHolder.java b/app/src/main/java/com/xuexiang/xuidemo/adapter/base/RecyclerViewHolder.java index 190a2a44..f781e5f4 100755 --- a/app/src/main/java/com/xuexiang/xuidemo/adapter/base/RecyclerViewHolder.java +++ b/app/src/main/java/com/xuexiang/xuidemo/adapter/base/RecyclerViewHolder.java @@ -1,10 +1,10 @@ package com.xuexiang.xuidemo.adapter.base; -import android.support.annotation.ColorRes; -import android.support.annotation.IdRes; -import android.support.annotation.StringRes; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.ColorRes; +import androidx.annotation.IdRes; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; import android.text.TextWatcher; import android.util.SparseArray; import android.view.View; diff --git a/app/src/main/java/com/xuexiang/xuidemo/adapter/menu/DrawerAdapter.java b/app/src/main/java/com/xuexiang/xuidemo/adapter/menu/DrawerAdapter.java index a45183a0..e2c4e7e9 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/adapter/menu/DrawerAdapter.java +++ b/app/src/main/java/com/xuexiang/xuidemo/adapter/menu/DrawerAdapter.java @@ -16,7 +16,7 @@ package com.xuexiang.xuidemo.adapter.menu; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/xuexiang/xuidemo/adapter/swipe/SwipeDragTouchListAdapter.java b/app/src/main/java/com/xuexiang/xuidemo/adapter/swipe/SwipeDragTouchListAdapter.java index 0d2d23bb..c2b7fe12 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/adapter/swipe/SwipeDragTouchListAdapter.java +++ b/app/src/main/java/com/xuexiang/xuidemo/adapter/swipe/SwipeDragTouchListAdapter.java @@ -1,6 +1,6 @@ package com.xuexiang.xuidemo.adapter.swipe; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.MotionEvent; import android.view.View; diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/AppCompatPreferenceActivity.java b/app/src/main/java/com/xuexiang/xuidemo/base/AppCompatPreferenceActivity.java index cef429f2..820249ba 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/AppCompatPreferenceActivity.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/AppCompatPreferenceActivity.java @@ -20,16 +20,17 @@ import android.content.res.Configuration; import android.os.Bundle; import android.preference.PreferenceActivity; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatDelegate; -import android.support.v7.widget.Toolbar; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.appcompat.widget.Toolbar; + /** * A {@link PreferenceActivity} which implements and proxies the necessary calls * to be used with AppCompat. diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/BaseFragment.java b/app/src/main/java/com/xuexiang/xuidemo/base/BaseFragment.java index f16aa723..abe0158c 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/BaseFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/BaseFragment.java @@ -1,11 +1,11 @@ package com.xuexiang.xuidemo.base; import android.content.res.Configuration; -import android.os.Bundle; -import android.support.v4.app.Fragment; import android.view.View; import android.view.ViewGroup; +import androidx.fragment.app.Fragment; + import com.xuexiang.xpage.base.XPageFragment; import com.xuexiang.xpage.core.PageOption; import com.xuexiang.xpage.enums.CoreAnim; diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/BaseHomeFragment.java b/app/src/main/java/com/xuexiang/xuidemo/base/BaseHomeFragment.java index 4fcf50b9..a281f47b 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/BaseHomeFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/BaseHomeFragment.java @@ -17,8 +17,8 @@ package com.xuexiang.xuidemo.base; import android.content.res.Configuration; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.KeyEvent; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/ComponentContainerFragment.java b/app/src/main/java/com/xuexiang/xuidemo/base/ComponentContainerFragment.java index 5071c5c4..da69a34c 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/ComponentContainerFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/ComponentContainerFragment.java @@ -1,7 +1,7 @@ package com.xuexiang.xuidemo.base; import android.content.res.Configuration; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/decorator/DividerItemDecoration.java b/app/src/main/java/com/xuexiang/xuidemo/base/decorator/DividerItemDecoration.java index fd28da0c..b0df8126 100755 --- a/app/src/main/java/com/xuexiang/xuidemo/base/decorator/DividerItemDecoration.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/decorator/DividerItemDecoration.java @@ -6,10 +6,10 @@ import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.ViewCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.core.content.ContextCompat; + +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; /** diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/decorator/GridDividerItemDecoration.java b/app/src/main/java/com/xuexiang/xuidemo/base/decorator/GridDividerItemDecoration.java index cacfe31d..eae12403 100755 --- a/app/src/main/java/com/xuexiang/xuidemo/base/decorator/GridDividerItemDecoration.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/decorator/GridDividerItemDecoration.java @@ -5,8 +5,8 @@ import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.support.v4.view.ViewCompat; -import android.support.v7.widget.RecyclerView; +import androidx.core.view.ViewCompat; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; /** diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/webview/AgentWebActivity.java b/app/src/main/java/com/xuexiang/xuidemo/base/webview/AgentWebActivity.java index 276a876b..82966acf 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/webview/AgentWebActivity.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/webview/AgentWebActivity.java @@ -19,9 +19,9 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.AppCompatActivity; import android.view.KeyEvent; import com.xuexiang.xuidemo.R; diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/webview/AgentWebFragment.java b/app/src/main/java/com/xuexiang/xuidemo/base/webview/AgentWebFragment.java index 7c6b6f76..0d2aaa0d 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/webview/AgentWebFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/webview/AgentWebFragment.java @@ -27,10 +27,6 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; -import android.support.v4.app.Fragment; -import android.support.v7.widget.PopupMenu; import android.text.TextUtils; import android.util.Log; import android.view.Gravity; @@ -51,6 +47,11 @@ import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.appcompat.widget.PopupMenu; +import androidx.fragment.app.Fragment; + import com.google.gson.Gson; import com.just.agentweb.action.PermissionInterceptor; import com.just.agentweb.core.AgentWeb; @@ -148,7 +149,7 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { // .openParallelDownload()// 4.0.0删除该API 打开并行下载 , 默认串行下载。 请通过AgentWebDownloader#Extra实现并行下载 // .setNotifyIcon(R.drawable.ic_file_download_black_24dp) 4.0.0删除该api //下载通知图标。4.0.0后的版本请通过AgentWebDownloader#Extra修改icon //打开其他页面时,弹窗质询用户前往其他应用 AgentWeb 3.0.0 加入。 - .setOpenOtherPageWays(DefaultWebClient.OpenOtherPageWays.DISALLOW) +// .setOpenOtherPageWays(DefaultWebClient.OpenOtherPageWays.DISALLOW) //拦截找不到相关页面的Url AgentWeb 3.0.0 加入。 .interceptUnkownUrl() //创建AgentWeb。 diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/webview/MiddlewareWebViewClient.java b/app/src/main/java/com/xuexiang/xuidemo/base/webview/MiddlewareWebViewClient.java index 688ab71b..e3a319df 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/webview/MiddlewareWebViewClient.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/webview/MiddlewareWebViewClient.java @@ -19,7 +19,7 @@ import android.content.DialogInterface; import android.content.Intent; import android.os.Build; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.Log; import android.webkit.WebResourceRequest; import android.webkit.WebResourceResponse; diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/webview/WebLayout.java b/app/src/main/java/com/xuexiang/xuidemo/base/webview/WebLayout.java index 52080a19..0f35f0e4 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/webview/WebLayout.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/webview/WebLayout.java @@ -17,8 +17,8 @@ package com.xuexiang.xuidemo.base.webview; import android.app.Activity; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.ViewGroup; import android.webkit.WebView; diff --git a/app/src/main/java/com/xuexiang/xuidemo/base/webview/XPageWebViewFragment.java b/app/src/main/java/com/xuexiang/xuidemo/base/webview/XPageWebViewFragment.java index 4e2514ae..6969bb88 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/base/webview/XPageWebViewFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/base/webview/XPageWebViewFragment.java @@ -27,11 +27,6 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; -import android.support.v4.app.Fragment; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.PopupMenu; import android.text.TextUtils; import android.view.Gravity; import android.view.KeyEvent; @@ -48,6 +43,12 @@ import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.appcompat.widget.PopupMenu; +import androidx.fragment.app.Fragment; + import com.just.agentweb.action.PermissionInterceptor; import com.just.agentweb.core.AgentWeb; import com.just.agentweb.core.client.DefaultWebClient; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/QRCodeFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/QRCodeFragment.java index 5fabfca7..a25c6680 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/QRCodeFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/QRCodeFragment.java @@ -19,7 +19,7 @@ import android.content.Intent; import android.graphics.Bitmap; import android.os.Bundle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.View; import android.widget.ImageView; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/banner/UserGuideFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/banner/UserGuideFragment.java index fc7459a5..86ee2871 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/banner/UserGuideFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/banner/UserGuideFragment.java @@ -1,7 +1,7 @@ package com.xuexiang.xuidemo.fragment.components.banner; import android.os.Bundle; -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.ViewPager; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.widget.actionbar.TitleBar; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/DialogStrategyFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/DialogStrategyFragment.java index 4983f23e..f47a9a05 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/DialogStrategyFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/DialogStrategyFragment.java @@ -18,7 +18,7 @@ package com.xuexiang.xuidemo.fragment.components.dialog; import android.content.DialogInterface; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.InputType; import com.xuexiang.xpage.annotation.Page; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/MaterialDialogFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/MaterialDialogFragment.java index 60a6c8a0..8407bbec 100755 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/MaterialDialogFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/dialog/MaterialDialogFragment.java @@ -18,7 +18,7 @@ package com.xuexiang.xuidemo.fragment.components.dialog; import android.content.DialogInterface; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.text.InputType; import android.view.View; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/RadiusImageViewFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/RadiusImageViewFragment.java index d51093e8..8b31d84b 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/RadiusImageViewFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/RadiusImageViewFragment.java @@ -1,7 +1,7 @@ package com.xuexiang.xuidemo.fragment.components.imageview; import android.graphics.Color; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.view.View; import com.xuexiang.xpage.annotation.Page; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/PhotoAdapter.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/PhotoAdapter.java index e0ae0658..dd11d83e 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/PhotoAdapter.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/PhotoAdapter.java @@ -18,7 +18,7 @@ import android.content.Context; import android.net.Uri; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/PhotoPickerFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/PhotoPickerFragment.java index effadd55..6d751ed8 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/PhotoPickerFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/PhotoPickerFragment.java @@ -17,11 +17,12 @@ package com.xuexiang.xuidemo.fragment.components.imageview.photopicker; import android.content.Intent; -import android.support.v7.widget.OrientationHelper; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.StaggeredGridLayoutManager; import android.view.View; +import androidx.recyclerview.widget.OrientationHelper; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.StaggeredGridLayoutManager; + import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xuidemo.R; import com.xuexiang.xuidemo.base.BaseFragment; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/RecyclerItemClickListener.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/RecyclerItemClickListener.java index 17734aab..dcb18e4b 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/RecyclerItemClickListener.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/photopicker/RecyclerItemClickListener.java @@ -17,7 +17,7 @@ package com.xuexiang.xuidemo.fragment.components.imageview.photopicker; import android.content.Context; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/ImageViewInfo.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/ImageViewInfo.java index 84c530e6..85e27fa9 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/ImageViewInfo.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/ImageViewInfo.java @@ -19,7 +19,7 @@ import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.xuexiang.xui.widget.imageview.preview.enitity.IPreviewInfo; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/NineGridImageViewFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/NineGridImageViewFragment.java index cc1de2a5..4e4784bd 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/NineGridImageViewFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/NineGridImageViewFragment.java @@ -16,12 +16,13 @@ package com.xuexiang.xuidemo.fragment.components.imageview.preview; -import android.support.annotation.NonNull; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.View; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.api.RefreshLayout; import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener; @@ -38,7 +39,7 @@ import butterknife.BindView; -import static android.support.v7.widget.DividerItemDecoration.VERTICAL; +import static androidx.recyclerview.widget.RecyclerView.VERTICAL; /** * @author xuexiang diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/PreviewRecycleViewFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/PreviewRecycleViewFragment.java index ecf08eb2..54a27436 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/PreviewRecycleViewFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/imageview/preview/PreviewRecycleViewFragment.java @@ -17,9 +17,9 @@ package com.xuexiang.xuidemo.fragment.components.imageview.preview; import android.graphics.Rect; -import android.support.annotation.NonNull; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.ImageView; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/popupwindow/SnackbarFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/popupwindow/SnackbarFragment.java index 5807d8bb..0d81406f 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/popupwindow/SnackbarFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/popupwindow/SnackbarFragment.java @@ -17,11 +17,11 @@ package com.xuexiang.xuidemo.fragment.components.popupwindow; import android.graphics.Color; -import android.support.design.widget.Snackbar; import android.view.Gravity; import android.view.View; import android.widget.ImageView; +import com.google.android.material.snackbar.Snackbar; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.utils.ResUtils; import com.xuexiang.xui.utils.SnackbarUtils; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/popupwindow/XUIPopupFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/popupwindow/XUIPopupFragment.java index abdcab27..3cc4693e 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/popupwindow/XUIPopupFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/popupwindow/XUIPopupFragment.java @@ -1,6 +1,6 @@ package com.xuexiang.xuidemo.fragment.components.popupwindow; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.view.View; import android.widget.AdapterView; import android.widget.Button; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/RefreshHeadViewFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/RefreshHeadViewFragment.java index 3bb898d7..b6408a27 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/RefreshHeadViewFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/RefreshHeadViewFragment.java @@ -1,7 +1,7 @@ package com.xuexiang.xuidemo.fragment.components.refresh; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.api.RefreshLayout; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/SwipeRefreshLayoutFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/SwipeRefreshLayoutFragment.java index f6081989..786a1f9b 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/SwipeRefreshLayoutFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/SwipeRefreshLayoutFragment.java @@ -1,8 +1,8 @@ package com.xuexiang.xuidemo.fragment.components.refresh; import android.os.Handler; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.recyclerview.widget.RecyclerView; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xuidemo.DemoDataProvider; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/broccoli/AnimationPlaceholderFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/broccoli/AnimationPlaceholderFragment.java index 55e33c77..1d9a5b47 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/broccoli/AnimationPlaceholderFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/broccoli/AnimationPlaceholderFragment.java @@ -1,11 +1,12 @@ package com.xuexiang.xuidemo.fragment.components.refresh.broccoli; -import android.support.annotation.NonNull; -import android.support.v7.widget.DefaultItemAnimator; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.View; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DefaultItemAnimator; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.adapter.SmartViewHolder; import com.scwang.smartrefresh.layout.api.RefreshLayout; @@ -22,7 +23,7 @@ import butterknife.BindView; -import static android.support.v7.widget.DividerItemDecoration.VERTICAL; +import static androidx.recyclerview.widget.RecyclerView.VERTICAL; /** * @author xuexiang diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/broccoli/CommonPlaceholderFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/broccoli/CommonPlaceholderFragment.java index 9e006165..4ae5ff79 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/broccoli/CommonPlaceholderFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/broccoli/CommonPlaceholderFragment.java @@ -1,9 +1,9 @@ package com.xuexiang.xuidemo.fragment.components.refresh.broccoli; -import android.support.annotation.NonNull; -import android.support.v7.widget.DefaultItemAnimator; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DefaultItemAnimator; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import com.scwang.smartrefresh.layout.SmartRefreshLayout; @@ -24,7 +24,7 @@ import butterknife.BindView; -import static android.support.v7.widget.DividerItemDecoration.VERTICAL; +import static androidx.recyclerview.widget.DividerItemDecoration.VERTICAL; /** * @author xuexiang diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/RefreshBasicFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/RefreshBasicFragment.java index 797989b8..bf64f21d 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/RefreshBasicFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/RefreshBasicFragment.java @@ -16,7 +16,7 @@ package com.xuexiang.xuidemo.fragment.components.refresh.smartrefresh; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.View; import android.widget.AbsListView; import com.scwang.smartrefresh.layout.adapter.SmartViewHolder; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/RefreshStatusLayoutFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/RefreshStatusLayoutFragment.java index 2a57cd6c..6192938f 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/RefreshStatusLayoutFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/RefreshStatusLayoutFragment.java @@ -16,8 +16,8 @@ package com.xuexiang.xuidemo.fragment.components.refresh.smartrefresh; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import com.scwang.smartrefresh.layout.SmartRefreshLayout; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshAllStyleFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshAllStyleFragment.java index bf5cf5c5..94c768fd 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshAllStyleFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshAllStyleFragment.java @@ -17,8 +17,8 @@ package com.xuexiang.xuidemo.fragment.components.refresh.smartrefresh.style; import android.content.Context; -import android.support.annotation.StringRes; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.StringRes; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import com.scwang.smartrefresh.layout.SmartRefreshLayout; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshClassicsStyleFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshClassicsStyleFragment.java index 260a31f1..645cbb74 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshClassicsStyleFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshClassicsStyleFragment.java @@ -19,15 +19,16 @@ import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Build; -import android.support.annotation.StringRes; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.DefaultItemAnimator; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.DefaultItemAnimator; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.adapter.SmartRecyclerAdapter; import com.scwang.smartrefresh.layout.adapter.SmartViewHolder; @@ -49,7 +50,7 @@ import butterknife.BindView; import static android.R.layout.simple_list_item_2; -import static android.support.v7.widget.DividerItemDecoration.VERTICAL; +import static androidx.recyclerview.widget.RecyclerView.VERTICAL; /** * @author xuexiang @@ -82,7 +83,9 @@ protected TitleBar initTitle() { */ @Override public void onItemClick(View itemView, int position) { - if (!RefreshState.None.equals(mRefreshLayout.getState())) return; + if (!RefreshState.None.equals(mRefreshLayout.getState())) { + return; + } switch (Item.values()[position]) { case 背后固定: diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshMaterialStyleFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshMaterialStyleFragment.java index 571db9fa..0acc86ca 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshMaterialStyleFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/smartrefresh/style/RefreshMaterialStyleFragment.java @@ -17,9 +17,9 @@ package com.xuexiang.xuidemo.fragment.components.refresh.smartrefresh.style; import android.os.Build; -import android.support.annotation.StringRes; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.StringRes; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import com.scwang.smartrefresh.header.MaterialHeader; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeDragMoveFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeDragMoveFragment.java index d8c162cb..fcd1fa04 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeDragMoveFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeDragMoveFragment.java @@ -1,6 +1,6 @@ package com.xuexiang.xuidemo.fragment.components.refresh.swipe; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.widget.actionbar.TitleBar; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeMenuItemFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeMenuItemFragment.java index 0d793885..dc1b4079 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeMenuItemFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeMenuItemFragment.java @@ -2,7 +2,7 @@ import android.graphics.Color; import android.os.Handler; -import android.support.v4.widget.SwipeRefreshLayout; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import android.view.ViewGroup; import com.xuexiang.xpage.annotation.Page; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeRefreshFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeRefreshFragment.java index 61818267..55d7de63 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeRefreshFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/refresh/swipe/SwipeRefreshFragment.java @@ -1,7 +1,7 @@ package com.xuexiang.xuidemo.fragment.components.refresh.swipe; import android.os.Handler; -import android.support.v4.widget.SwipeRefreshLayout; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xuidemo.DemoDataProvider; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/EasyIndicatorFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/EasyIndicatorFragment.java index e8337f2c..366bcb09 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/EasyIndicatorFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/EasyIndicatorFragment.java @@ -17,13 +17,14 @@ package com.xuexiang.xuidemo.fragment.components.tabbar; import android.content.Intent; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.widget.actionbar.TitleBar; import com.xuexiang.xui.widget.tabbar.EasyIndicator; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/JPTabBarFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/JPTabBarFragment.java index 155b251f..b78c06a2 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/JPTabBarFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/JPTabBarFragment.java @@ -1,17 +1,15 @@ package com.xuexiang.xuidemo.fragment.components.tabbar; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + import com.jpeng.jptabbar.JPTabBar; import com.jpeng.jptabbar.OnTabSelectListener; -import com.jpeng.jptabbar.anno.NorIcons; -import com.jpeng.jptabbar.anno.SeleIcons; -import com.jpeng.jptabbar.anno.Titles; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xuidemo.R; import com.xuexiang.xuidemo.base.BaseActivity; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/TabLayoutFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/TabLayoutFragment.java index 466d8b9c..0a10bc58 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/TabLayoutFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/TabLayoutFragment.java @@ -16,17 +16,17 @@ package com.xuexiang.xuidemo.fragment.components.tabbar; -import android.support.annotation.Nullable; -import android.support.design.widget.TabLayout; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.tabs.TabLayout; import com.xuexiang.xpage.annotation.Page; -import com.xuexiang.xui.widget.tabbar.TabSegment; import com.xuexiang.xuidemo.R; import com.xuexiang.xuidemo.base.BaseFragment; import com.xuexiang.xuidemo.fragment.components.tabbar.tabsegment.MultiPage; @@ -37,7 +37,7 @@ import butterknife.BindView; -import static android.support.design.widget.TabLayout.MODE_SCROLLABLE; +import static com.google.android.material.tabs.TabLayout.MODE_SCROLLABLE; /** * @author xuexiang diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/TestPageFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/TestPageFragment.java index 50e81275..2f3ac9eb 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/TestPageFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/TestPageFragment.java @@ -18,9 +18,10 @@ 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 android.view.Gravity; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/VerticalTabLayoutFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/VerticalTabLayoutFragment.java index 31b64f45..fc698538 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/VerticalTabLayoutFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/VerticalTabLayoutFragment.java @@ -17,13 +17,14 @@ package com.xuexiang.xuidemo.fragment.components.tabbar; import android.graphics.Color; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.utils.DensityUtils; import com.xuexiang.xui.widget.tabbar.VerticalTabLayout; @@ -199,13 +200,15 @@ public int getCount() { @Override public TabView.TabBadge getBadge(int position) { - if (position == 5) return new TabView.TabBadge.Builder().setBadgeNumber(666) - .setExactMode(true) - .setOnDragStateChangedListener(new Badge.OnDragStateChangedListener() { - @Override - public void onDragStateChanged(int dragState, Badge badge, View targetView) { - } - }).build(); + if (position == 5) { + return new TabView.TabBadge.Builder().setBadgeNumber(666) + .setExactMode(true) + .setOnDragStateChangedListener(new Badge.OnDragStateChangedListener() { + @Override + public void onDragStateChanged(int dragState, Badge badge, View targetView) { + } + }).build(); + } return null; } diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/tabsegment/TabSegmentFixModeFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/tabsegment/TabSegmentFixModeFragment.java index 50dfe985..f98ced9c 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/tabsegment/TabSegmentFixModeFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/tabsegment/TabSegmentFixModeFragment.java @@ -16,14 +16,15 @@ package com.xuexiang.xuidemo.fragment.components.tabbar.tabsegment; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.core.content.ContextCompat; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + import com.xuexiang.xaop.annotation.SingleClick; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.utils.DensityUtils; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/tabsegment/TabSegmentScrollableModeFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/tabsegment/TabSegmentScrollableModeFragment.java index e00c6cce..7efd5cb3 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/tabsegment/TabSegmentScrollableModeFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/tabbar/tabsegment/TabSegmentScrollableModeFragment.java @@ -16,15 +16,16 @@ package com.xuexiang.xuidemo.fragment.components.tabbar.tabsegment; -import android.support.annotation.NonNull; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + import com.xuexiang.xaop.annotation.SingleClick; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.utils.DensityUtils; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/textview/GroupListViewFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/textview/GroupListViewFragment.java index a236fe3c..bab65826 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/textview/GroupListViewFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/textview/GroupListViewFragment.java @@ -16,12 +16,11 @@ package com.xuexiang.xuidemo.fragment.components.textview; -import android.support.v4.content.ContextCompat; -import android.view.LayoutInflater; +import androidx.core.content.ContextCompat; + import android.view.View; import android.view.ViewGroup; import android.widget.CompoundButton; -import android.widget.Toast; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.utils.DensityUtils; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/textview/supertextview/SuperNetPictureLoadingFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/textview/supertextview/SuperNetPictureLoadingFragment.java index 9977e47d..3053b433 100755 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/components/textview/supertextview/SuperNetPictureLoadingFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/components/textview/supertextview/SuperNetPictureLoadingFragment.java @@ -1,8 +1,8 @@ package com.xuexiang.xuidemo.fragment.components.textview.supertextview; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/SnapHelperFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/SnapHelperFragment.java index af2fd498..8427bf98 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/SnapHelperFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/SnapHelperFragment.java @@ -17,13 +17,14 @@ package com.xuexiang.xuidemo.fragment.expands; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.PagerSnapHelper; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.SnapHelper; import android.view.View; import android.view.ViewGroup; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.PagerSnapHelper; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.SnapHelper; + import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.widget.actionbar.TitleBar; import com.xuexiang.xui.widget.dialog.bottomsheet.BottomSheet; @@ -92,10 +93,10 @@ public void onClick(BottomSheet dialog, View itemView, int position, String tag) dialog.dismiss(); switch (position) { case 0: - mPagerLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL); + mPagerLayoutManager.setOrientation(RecyclerView.HORIZONTAL); break; case 1: - mPagerLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); + mPagerLayoutManager.setOrientation(RecyclerView.VERTICAL); break; default: break; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/chart/bar/BasicBarChartFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/chart/bar/BasicBarChartFragment.java index ef3eb7dc..3525ddaa 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/chart/bar/BasicBarChartFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/chart/bar/BasicBarChartFragment.java @@ -1,6 +1,6 @@ package com.xuexiang.xuidemo.fragment.expands.chart.bar; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.view.View; import com.github.mikephil.charting.charts.BarChart; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/chart/line/BasicLineChartFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/chart/line/BasicLineChartFragment.java index f6bdd554..d648c61e 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/chart/line/BasicLineChartFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/chart/line/BasicLineChartFragment.java @@ -3,7 +3,9 @@ import android.graphics.Color; import android.graphics.DashPathEffect; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; + +import androidx.core.content.ContextCompat; + import android.view.View; import com.github.mikephil.charting.animation.Easing; @@ -201,6 +203,7 @@ protected void setChartData(int count, float range) { set1.setFillFormatter(new IFillFormatter() { @Override public float getFillLinePosition(ILineDataSet dataSet, LineDataProvider dataProvider) { + if (chart == null) return 0; return chart.getAxisLeft().getAxisMinimum(); } }); @@ -281,7 +284,7 @@ public void onClick(BottomSheet dialog, View itemView, int position, String tag) LineDataSet set = (LineDataSet) iSet; set.setMode(set.getMode() == LineDataSet.Mode.CUBIC_BEZIER ? LineDataSet.Mode.LINEAR - : LineDataSet.Mode.CUBIC_BEZIER); + : LineDataSet.Mode.CUBIC_BEZIER); } chart.invalidate(); break; @@ -290,7 +293,7 @@ public void onClick(BottomSheet dialog, View itemView, int position, String tag) chart.invalidate(); break; case 6: - if(chart.getData() != null) { + if (chart.getData() != null) { chart.getData().setHighlightEnabled(!chart.getData().isHighlightEnabled()); chart.invalidate(); } diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/floatview/service/AppMonitorService.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/floatview/service/AppMonitorService.java index 511b34ce..45b250a9 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/floatview/service/AppMonitorService.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/floatview/service/AppMonitorService.java @@ -9,8 +9,8 @@ import android.content.pm.ApplicationInfo; import android.os.Build; import android.os.IBinder; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import com.xuexiang.xuidemo.R; import com.xuexiang.xuidemo.fragment.expands.floatview.AppSwitchView; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/BottomSheetDialogFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/BottomSheetDialogFragment.java index 6f51e817..294d3f41 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/BottomSheetDialogFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/BottomSheetDialogFragment.java @@ -17,13 +17,14 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign; -import android.support.design.widget.BottomSheetDialog; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.google.android.material.bottomsheet.BottomSheetDialog; import com.xuexiang.xpage.AppPageConfig; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xpage.model.PageInfo; @@ -95,7 +96,7 @@ private void showBottomSheetListDialog(boolean isList) { private void initDialogList(RecyclerView recyclerView) { LinearLayoutManager manager = new LinearLayoutManager(getContext()); - manager.setOrientation(LinearLayoutManager.VERTICAL); + manager.setOrientation(RecyclerView.VERTICAL); recyclerView.setLayoutManager(manager); SimpleRecyclerAdapter adapter = new SimpleRecyclerAdapter(); recyclerView.setAdapter(adapter); diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/DrawerLayoutFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/DrawerLayoutFragment.java index 5eaa5b1e..5dca8ac4 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/DrawerLayoutFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/DrawerLayoutFragment.java @@ -17,18 +17,19 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign; -import android.support.annotation.NonNull; -import android.support.design.widget.BottomNavigationView; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.NavigationView; -import android.support.v4.view.ViewPager; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.widget.LinearLayout; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.appcompat.widget.Toolbar; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.bottomnavigation.BottomNavigationView; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.navigation.NavigationView; import com.xuexiang.xaop.annotation.SingleClick; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.adapter.FragmentAdapter; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/ToolBarFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/ToolBarFragment.java index e3950d7d..5c9d7612 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/ToolBarFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/ToolBarFragment.java @@ -1,6 +1,6 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign; -import android.support.v7.widget.Toolbar; +import androidx.appcompat.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.widget.EditText; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/BottomNavigationViewBehaviorFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/BottomNavigationViewBehaviorFragment.java index 9ac537d2..6eb77129 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/BottomNavigationViewBehaviorFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/BottomNavigationViewBehaviorFragment.java @@ -17,14 +17,15 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign.behavior; -import android.support.annotation.NonNull; -import android.support.design.widget.BottomNavigationView; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.view.ViewPager; -import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.Toolbar; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.bottomnavigation.BottomNavigationView; +import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.adapter.FragmentAdapter; import com.xuexiang.xui.widget.actionbar.TitleBar; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/ComplexDetailsPageFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/ComplexDetailsPageFragment.java index 09948bca..a70b49cb 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/ComplexDetailsPageFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/ComplexDetailsPageFragment.java @@ -17,14 +17,15 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign.behavior; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.CollapsingToolbarLayout; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.TabLayout; -import android.support.v4.view.ViewPager; -import android.support.v7.widget.Toolbar; import android.view.View; +import androidx.appcompat.widget.Toolbar; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.appbar.CollapsingToolbarLayout; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.tabs.TabLayout; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.adapter.FragmentAdapter; import com.xuexiang.xui.utils.StatusBarUtils; @@ -36,7 +37,7 @@ import butterknife.BindView; -import static android.support.design.widget.TabLayout.MODE_FIXED; +import static com.google.android.material.tabs.TabLayout.MODE_FIXED; /** * @author xuexiang diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/RecyclerViewBehaviorFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/RecyclerViewBehaviorFragment.java index 899586da..9904d50c 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/RecyclerViewBehaviorFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/RecyclerViewBehaviorFragment.java @@ -1,13 +1,14 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign.behavior; import android.os.Handler; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.DefaultItemAnimator; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.Toolbar; import android.view.View; +import androidx.appcompat.widget.Toolbar; +import androidx.recyclerview.widget.DefaultItemAnimator; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.scwang.smartrefresh.layout.adapter.SmartViewHolder; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.widget.actionbar.TitleBar; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/SimpleListFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/SimpleListFragment.java index 404e9022..c1191ff5 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/SimpleListFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/SimpleListFragment.java @@ -1,10 +1,11 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign.behavior; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.DefaultItemAnimator; -import android.support.v7.widget.LinearLayoutManager; import android.view.View; +import androidx.recyclerview.widget.DefaultItemAnimator; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + import com.scwang.smartrefresh.layout.adapter.SmartViewHolder; import com.xuexiang.xui.widget.actionbar.TitleBar; import com.xuexiang.xuidemo.DemoDataProvider; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/TabLayoutBehaviorFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/TabLayoutBehaviorFragment.java index cf6857dd..cfa995dc 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/TabLayoutBehaviorFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/TabLayoutBehaviorFragment.java @@ -1,10 +1,9 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign.behavior; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.design.widget.TabLayout; -import android.support.v4.view.ViewPager; -import android.support.v7.widget.Toolbar; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.tabs.TabLayout; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.widget.Toolbar; import android.view.View; import com.xuexiang.xpage.annotation.Page; @@ -16,7 +15,7 @@ import butterknife.BindView; -import static android.support.design.widget.TabLayout.MODE_FIXED; +import static com.google.android.material.tabs.TabLayout.MODE_FIXED; /** * @author XUE diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/ToolbarBehaviorFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/ToolbarBehaviorFragment.java index 5d19d32c..a680eead 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/ToolbarBehaviorFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/materialdesign/behavior/ToolbarBehaviorFragment.java @@ -1,9 +1,9 @@ package com.xuexiang.xuidemo.fragment.expands.materialdesign.behavior; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.CollapsingToolbarLayout; -import android.support.design.widget.FloatingActionButton; -import android.support.v7.widget.Toolbar; +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.appbar.CollapsingToolbarLayout; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.appcompat.widget.Toolbar; import android.view.View; import com.xuexiang.xpage.annotation.Page; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/qrcode/QRCodeProduceFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/qrcode/QRCodeProduceFragment.java index 67b37476..446e5153 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/qrcode/QRCodeProduceFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/expands/qrcode/QRCodeProduceFragment.java @@ -22,7 +22,6 @@ import android.graphics.BitmapFactory; import android.graphics.Color; import android.net.Uri; -import android.support.v7.widget.SwitchCompat; import android.view.View; import android.widget.CheckBox; import android.widget.CompoundButton; @@ -30,6 +29,8 @@ import android.widget.ImageView; import android.widget.LinearLayout; +import androidx.appcompat.widget.SwitchCompat; + import com.xuexiang.xaop.annotation.IOThread; import com.xuexiang.xaop.annotation.MainThread; import com.xuexiang.xaop.annotation.Permission; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/ColorUtilsFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/ColorUtilsFragment.java index e9748aa8..a7ed4c12 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/ColorUtilsFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/ColorUtilsFragment.java @@ -16,7 +16,7 @@ package com.xuexiang.xuidemo.fragment.utils; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.view.View; import android.widget.LinearLayout; import android.widget.SeekBar; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/DrawableUtilsFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/DrawableUtilsFragment.java index 9d3086f3..3484e0c2 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/DrawableUtilsFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/DrawableUtilsFragment.java @@ -19,11 +19,10 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.LayerDrawable; -import android.support.v4.content.ContextCompat; -import android.support.v4.widget.NestedScrollView; +import androidx.core.content.ContextCompat; +import androidx.core.widget.NestedScrollView; import android.view.View; import android.widget.ImageView; -import android.widget.ScrollView; import com.xuexiang.xaop.annotation.SingleClick; import com.xuexiang.xpage.annotation.Page; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/SnackBarUtilsFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/SnackBarUtilsFragment.java index 131ed587..a81c7a99 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/SnackBarUtilsFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/SnackBarUtilsFragment.java @@ -17,11 +17,11 @@ package com.xuexiang.xuidemo.fragment.utils; import android.graphics.Color; -import android.support.design.widget.Snackbar; import android.view.Gravity; import android.view.View; import android.widget.ImageView; +import com.google.android.material.snackbar.Snackbar; import com.xuexiang.xpage.annotation.Page; import com.xuexiang.xui.utils.ResUtils; import com.xuexiang.xui.utils.SnackbarUtils; diff --git a/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/view/ViewAnimationFragment.java b/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/view/ViewAnimationFragment.java index ed0c00c0..3539f34b 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/view/ViewAnimationFragment.java +++ b/app/src/main/java/com/xuexiang/xuidemo/fragment/utils/view/ViewAnimationFragment.java @@ -16,7 +16,7 @@ package com.xuexiang.xuidemo.fragment.utils.view; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; diff --git a/app/src/main/java/com/xuexiang/xuidemo/utils/DynamicTimeFormat.java b/app/src/main/java/com/xuexiang/xuidemo/utils/DynamicTimeFormat.java index 4c8a814a..b7a214c5 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/utils/DynamicTimeFormat.java +++ b/app/src/main/java/com/xuexiang/xuidemo/utils/DynamicTimeFormat.java @@ -16,7 +16,7 @@ package com.xuexiang.xuidemo.utils; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.text.FieldPosition; import java.text.SimpleDateFormat; diff --git a/app/src/main/java/com/xuexiang/xuidemo/utils/Utils.java b/app/src/main/java/com/xuexiang/xuidemo/utils/Utils.java index 0175da94..e6d8c0d1 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/utils/Utils.java +++ b/app/src/main/java/com/xuexiang/xuidemo/utils/Utils.java @@ -7,17 +7,18 @@ import android.graphics.Paint; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; -import android.support.v4.app.Fragment; -import android.support.v7.widget.DefaultItemAnimator; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.util.LruCache; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.DefaultItemAnimator; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import com.just.agentweb.core.AgentWeb; import com.xuexiang.xui.utils.DrawableUtils; import com.xuexiang.xui.widget.dialog.materialdialog.MaterialDialog; @@ -26,7 +27,7 @@ import com.xuexiang.xuidemo.utils.update.CustomUpdateFailureListener; import com.xuexiang.xupdate.XUpdate; -import static android.support.v7.widget.DividerItemDecoration.VERTICAL; +import static androidx.recyclerview.widget.OrientationHelper.VERTICAL; import static com.xuexiang.xuidemo.base.webview.AgentWebFragment.KEY_URL; /** diff --git a/app/src/main/java/com/xuexiang/xuidemo/utils/update/OKHttpUpdateHttpService.java b/app/src/main/java/com/xuexiang/xuidemo/utils/update/OKHttpUpdateHttpService.java index bd6b87e1..65b1e0d5 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/utils/update/OKHttpUpdateHttpService.java +++ b/app/src/main/java/com/xuexiang/xuidemo/utils/update/OKHttpUpdateHttpService.java @@ -16,7 +16,7 @@ package com.xuexiang.xuidemo.utils.update; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.xuexiang.xupdate.proxy.IUpdateHttpService; import com.zhy.http.okhttp.OkHttpUtils; diff --git a/app/src/main/java/com/xuexiang/xuidemo/widget/BottomBarBehavior.java b/app/src/main/java/com/xuexiang/xuidemo/widget/BottomBarBehavior.java index a58e0924..09b399cf 100755 --- a/app/src/main/java/com/xuexiang/xuidemo/widget/BottomBarBehavior.java +++ b/app/src/main/java/com/xuexiang/xuidemo/widget/BottomBarBehavior.java @@ -18,8 +18,8 @@ package com.xuexiang.xuidemo.widget; import android.content.Context; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.CoordinatorLayout; +import com.google.android.material.appbar.AppBarLayout; +import androidx.coordinatorlayout.widget.CoordinatorLayout; import android.util.AttributeSet; import android.view.View; diff --git a/app/src/main/java/com/xuexiang/xuidemo/widget/ConnectionStatusView.java b/app/src/main/java/com/xuexiang/xuidemo/widget/ConnectionStatusView.java index 3a4e97d7..b78c0b6d 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/widget/ConnectionStatusView.java +++ b/app/src/main/java/com/xuexiang/xuidemo/widget/ConnectionStatusView.java @@ -18,7 +18,7 @@ import android.content.Context; import android.os.Build; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.util.AttributeSet; import com.xuexiang.xui.widget.popupwindow.status.StatusView; diff --git a/app/src/main/java/com/xuexiang/xuidemo/widget/EditSpinnerDialog.java b/app/src/main/java/com/xuexiang/xuidemo/widget/EditSpinnerDialog.java index 43304d31..14c00174 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/widget/EditSpinnerDialog.java +++ b/app/src/main/java/com/xuexiang/xuidemo/widget/EditSpinnerDialog.java @@ -1,7 +1,7 @@ package com.xuexiang.xuidemo.widget; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.xuexiang.xui.UIConsts; import com.xuexiang.xui.XUI; diff --git a/app/src/main/java/com/xuexiang/xuidemo/widget/FabBehavior.java b/app/src/main/java/com/xuexiang/xuidemo/widget/FabBehavior.java index 8365caad..14a226d6 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/widget/FabBehavior.java +++ b/app/src/main/java/com/xuexiang/xuidemo/widget/FabBehavior.java @@ -2,16 +2,18 @@ import android.animation.Animator; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.design.widget.CoordinatorLayout; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.view.ViewCompat; -import android.support.v4.view.animation.FastOutSlowInInterpolator; import android.util.AttributeSet; import android.view.View; import android.view.ViewPropertyAnimator; import android.view.animation.Interpolator; +import androidx.annotation.NonNull; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import androidx.core.view.ViewCompat; +import androidx.interpolator.view.animation.FastOutSlowInInterpolator; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; + /** * 悬浮按钮的行为 * diff --git a/app/src/main/java/com/xuexiang/xuidemo/widget/ShadowAdjustLayout.java b/app/src/main/java/com/xuexiang/xuidemo/widget/ShadowAdjustLayout.java index d133de77..eed76d71 100644 --- a/app/src/main/java/com/xuexiang/xuidemo/widget/ShadowAdjustLayout.java +++ b/app/src/main/java/com/xuexiang/xuidemo/widget/ShadowAdjustLayout.java @@ -18,11 +18,12 @@ package com.xuexiang.xuidemo.widget; import android.content.Context; -import android.support.v4.widget.ViewDragHelper; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; +import androidx.customview.widget.ViewDragHelper; + import com.xuexiang.xui.widget.layout.XUIFrameLayout; import com.xuexiang.xuidemo.R; diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 83307469..0188d303 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -28,7 +28,7 @@ - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/adapter_news_list_item.xml b/app/src/main/res/layout/adapter_news_list_item.xml index 50e25da8..b96c7e77 100644 --- a/app/src/main/res/layout/adapter_news_list_item.xml +++ b/app/src/main/res/layout/adapter_news_list_item.xml @@ -107,7 +107,7 @@ android:gravity="center_vertical" android:orientation="horizontal"> - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_bottom_sheet.xml b/app/src/main/res/layout/dialog_bottom_sheet.xml index f8763f3f..96509782 100644 --- a/app/src/main/res/layout/dialog_bottom_sheet.xml +++ b/app/src/main/res/layout/dialog_bottom_sheet.xml @@ -57,7 +57,7 @@ android:layout_height="1px" android:background="@android:color/darker_gray" /> - - - - - - - - - - + - - + diff --git a/app/src/main/res/layout/fragment_behavior_toolbar.xml b/app/src/main/res/layout/fragment_behavior_toolbar.xml index 8ae76128..6ff6cd61 100644 --- a/app/src/main/res/layout/fragment_behavior_toolbar.xml +++ b/app/src/main/res/layout/fragment_behavior_toolbar.xml @@ -1,19 +1,19 @@ - - - - - - + - + - - @@ -63,5 +63,5 @@ android:layout_margin="18dp" android:text="@string/large_text" /> - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_bottom_navigationview_behavior.xml b/app/src/main/res/layout/fragment_bottom_navigationview_behavior.xml index 95594855..9b2e962a 100644 --- a/app/src/main/res/layout/fragment_bottom_navigationview_behavior.xml +++ b/app/src/main/res/layout/fragment_bottom_navigationview_behavior.xml @@ -15,17 +15,17 @@ ~ --> - - - - + - - - - + diff --git a/app/src/main/res/layout/fragment_broccoli_place_holder.xml b/app/src/main/res/layout/fragment_broccoli_place_holder.xml index 19111993..3e5a9f00 100644 --- a/app/src/main/res/layout/fragment_broccoli_place_holder.xml +++ b/app/src/main/res/layout/fragment_broccoli_place_holder.xml @@ -27,7 +27,7 @@ app:srlTextSizeTitle="16sp" app:srlTextTimeMarginTop="2dp" /> - - @@ -84,7 +84,7 @@ android:textSize="16sp" /> - + diff --git a/app/src/main/res/layout/fragment_complex_details_page.xml b/app/src/main/res/layout/fragment_complex_details_page.xml index 90fa2dbd..1fd2dd90 100644 --- a/app/src/main/res/layout/fragment_complex_details_page.xml +++ b/app/src/main/res/layout/fragment_complex_details_page.xml @@ -1,19 +1,19 @@ - - - - - - + - - + - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_custom_capture.xml b/app/src/main/res/layout/fragment_custom_capture.xml index aa20712b..d0dad431 100644 --- a/app/src/main/res/layout/fragment_custom_capture.xml +++ b/app/src/main/res/layout/fragment_custom_capture.xml @@ -48,7 +48,7 @@ android:gravity="center_horizontal" android:orientation="vertical"> - @@ -68,7 +68,7 @@ android:gravity="center_horizontal" android:orientation="vertical"> - @@ -89,7 +89,7 @@ android:gravity="center_horizontal" android:orientation="vertical"> - @@ -110,7 +110,7 @@ android:gravity="center_horizontal" android:orientation="vertical"> - diff --git a/app/src/main/res/layout/fragment_custom_edittext.xml b/app/src/main/res/layout/fragment_custom_edittext.xml index 64870fc4..863d0510 100755 --- a/app/src/main/res/layout/fragment_custom_edittext.xml +++ b/app/src/main/res/layout/fragment_custom_edittext.xml @@ -42,7 +42,7 @@ android:layout_margin="5dp" android:text="PasswordEditText:" /> - - + - - - + diff --git a/app/src/main/res/layout/fragment_easy_indicator.xml b/app/src/main/res/layout/fragment_easy_indicator.xml index 291dd836..b49152c3 100644 --- a/app/src/main/res/layout/fragment_easy_indicator.xml +++ b/app/src/main/res/layout/fragment_easy_indicator.xml @@ -42,7 +42,7 @@ app:indicator_textSize="14sp" app:indicator_width="0dp" /> - diff --git a/app/src/main/res/layout/fragment_guide_case_queue.xml b/app/src/main/res/layout/fragment_guide_case_queue.xml index a7ea6d7e..e32f3926 100755 --- a/app/src/main/res/layout/fragment_guide_case_queue.xml +++ b/app/src/main/res/layout/fragment_guide_case_queue.xml @@ -1,16 +1,21 @@ + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical">