From 22254a90cdb056342101a65a20a2affec73c6823 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 10 Aug 2019 21:37:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0androidx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .idea/codeStyles/Project.xml | 29 -------- .idea/compiler.xml | 22 ------ .idea/copyright/profiles_settings.xml | 3 - .idea/encodings.xml | 6 -- .idea/gradle.xml | 19 ----- .idea/markdown-navigator.xml | 72 ------------------- .../markdown-navigator/profiles_settings.xml | 3 - .idea/misc.xml | 49 ------------- .idea/modules.xml | 10 --- .idea/runConfigurations.xml | 12 ---- .idea/vcs.xml | 6 -- app/build.gradle | 25 ++++--- .../demo/demo/DialogFragmentActivity.java | 2 +- build.gradle | 4 +- gradle.properties | 2 + gradle/wrapper/gradle-wrapper.properties | 4 +- library/build.gradle | 28 ++++---- .../itsite/adialog/common/BaseViewHolder.java | 11 +-- .../cn/itsite/adialog/dialog/BaseDialog.java | 9 +-- .../itsite/adialog/dialog/LoadingDialog.java | 9 +-- .../itsite/adialog/dialog/SelectorDialog.java | 41 ++++------- .../dialogfragment/BaseDialogFragment.java | 11 +-- .../SelectorDialogFragment.java | 5 +- .../adialog/support/ADialogListener.java | 3 +- .../adialog/support/dialog/BaseDialog.java | 11 +-- .../adialog/support/dialog/LoadingDialog.java | 11 +-- .../support/dialog/SelectorDialog.java | 11 +-- .../dialogfragment/BaseDialogFragment.java | 15 ++-- .../SelectorDialogFragment.java | 5 +- library/src/main/res/values/strings.xml | 3 + 31 files changed, 106 insertions(+), 336 deletions(-) delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .idea/encodings.xml delete mode 100644 .idea/gradle.xml delete mode 100644 .idea/markdown-navigator.xml delete mode 100644 .idea/markdown-navigator/profiles_settings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/runConfigurations.xml delete mode 100644 .idea/vcs.xml create mode 100644 library/src/main/res/values/strings.xml diff --git a/.gitignore b/.gitignore index 39fb081..d1a486f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /build /captures .externalNativeBuild +/.idea diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 30aa626..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 96cc43e..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3..0000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 97626ba..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 66e2f6f..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml deleted file mode 100644 index d819570..0000000 --- a/.idea/markdown-navigator.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/markdown-navigator/profiles_settings.xml b/.idea/markdown-navigator/profiles_settings.xml deleted file mode 100644 index 57927c5..0000000 --- a/.idea/markdown-navigator/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index ad53516..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - 1.8 - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index bb56fe8..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index fd1c836..8123e6f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,33 +1,32 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "cn.itsite.adialog.demo" - minSdkVersion 17 - targetSdkVersion 27 - versionCode 19 - versionName "1.9" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + minSdkVersion 21 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'com.google.android.material:material:1.0.0' testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test:runner:1.2.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - //一个不错的RecyclerViewAdapter辅助框架 - implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.31' + implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.34' implementation project(':library') -// compile 'com.github.leguang:ADialog:1.5' } diff --git a/app/src/main/java/cn/itsite/adialog/demo/demo/DialogFragmentActivity.java b/app/src/main/java/cn/itsite/adialog/demo/demo/DialogFragmentActivity.java index 31f40b3..9017a5d 100644 --- a/app/src/main/java/cn/itsite/adialog/demo/demo/DialogFragmentActivity.java +++ b/app/src/main/java/cn/itsite/adialog/demo/demo/DialogFragmentActivity.java @@ -3,7 +3,7 @@ import android.app.Dialog; import android.content.Context; import android.os.Bundle; -import android.support.v4.app.DialogFragment; +import androidx.core.app.DialogFragment; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.view.Gravity; diff --git a/build.gradle b/build.gradle index c0c2b33..1bc8b31 100644 --- a/build.gradle +++ b/build.gradle @@ -4,9 +4,10 @@ buildscript { repositories { jcenter() google() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.4.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -18,6 +19,7 @@ allprojects { jcenter() maven { url "https://jitpack.io" } google() + mavenCentral() } } diff --git a/gradle.properties b/gradle.properties index aac7c9b..9e6fce1 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/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f31ae4a..c5b53cc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue May 15 10:41:15 CST 2018 +#Sat Aug 10 20:08:17 CST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip diff --git a/library/build.gradle b/library/build.gradle index 07c742d..fd8ca71 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,18 +1,16 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { - minSdkVersion 17 - targetSdkVersion 27 - versionCode 19 - versionName "1.9" - - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + minSdkVersion 21 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true - } compileOptions { @@ -23,18 +21,16 @@ android { buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } dependencies { - api fileTree(dir: 'libs', include: ['*.jar']) - androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'com.google.android.material:material:1.0.0' testImplementation 'junit:junit:4.12' - - api 'com.android.support:appcompat-v7:27.1.1' - api 'com.android.support:recyclerview-v7:27.1.1' + androidTestImplementation 'androidx.test:runner:1.2.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } diff --git a/library/src/main/java/cn/itsite/adialog/common/BaseViewHolder.java b/library/src/main/java/cn/itsite/adialog/common/BaseViewHolder.java index 61984c1..bf3404f 100644 --- a/library/src/main/java/cn/itsite/adialog/common/BaseViewHolder.java +++ b/library/src/main/java/cn/itsite/adialog/common/BaseViewHolder.java @@ -20,11 +20,6 @@ import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Build; -import android.support.annotation.ColorInt; -import android.support.annotation.DrawableRes; -import android.support.annotation.IdRes; -import android.support.annotation.StringRes; -import android.support.v7.widget.RecyclerView; import android.text.util.Linkify; import android.util.SparseArray; import android.view.View; @@ -38,6 +33,12 @@ import android.widget.RatingBar; import android.widget.TextView; +import androidx.annotation.ColorInt; +import androidx.annotation.DrawableRes; +import androidx.annotation.IdRes; +import androidx.annotation.StringRes; +import androidx.recyclerview.widget.RecyclerView; + /** * https://github.com/CymChad/BaseRecyclerViewAdapterHelper */ diff --git a/library/src/main/java/cn/itsite/adialog/dialog/BaseDialog.java b/library/src/main/java/cn/itsite/adialog/dialog/BaseDialog.java index 3833480..51f4467 100644 --- a/library/src/main/java/cn/itsite/adialog/dialog/BaseDialog.java +++ b/library/src/main/java/cn/itsite/adialog/dialog/BaseDialog.java @@ -3,13 +3,14 @@ import android.app.Dialog; import android.content.Context; import android.os.Bundle; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; import android.view.Window; import android.view.WindowManager; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; + import cn.itsite.adialog.ADialogListener; import cn.itsite.adialog.common.BaseViewHolder; import cn.itsite.adialog.common.Utils; diff --git a/library/src/main/java/cn/itsite/adialog/dialog/LoadingDialog.java b/library/src/main/java/cn/itsite/adialog/dialog/LoadingDialog.java index 8911e99..483117c 100644 --- a/library/src/main/java/cn/itsite/adialog/dialog/LoadingDialog.java +++ b/library/src/main/java/cn/itsite/adialog/dialog/LoadingDialog.java @@ -2,13 +2,14 @@ import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; import android.widget.TextView; -import cn.itsite.adialog.common.BaseViewHolder; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; + import cn.itsite.adialog.R; +import cn.itsite.adialog.common.BaseViewHolder; /** * Author:leguang on 2017/4/12 0009 14:23 diff --git a/library/src/main/java/cn/itsite/adialog/dialog/SelectorDialog.java b/library/src/main/java/cn/itsite/adialog/dialog/SelectorDialog.java index 8bf261e..17ca509 100644 --- a/library/src/main/java/cn/itsite/adialog/dialog/SelectorDialog.java +++ b/library/src/main/java/cn/itsite/adialog/dialog/SelectorDialog.java @@ -1,19 +1,19 @@ package cn.itsite.adialog.dialog; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import java.util.List; import cn.itsite.adialog.ADialogListener; -import cn.itsite.adialog.common.BaseViewHolder; import cn.itsite.adialog.R; +import cn.itsite.adialog.common.BaseViewHolder; /** * Author:leguang on 2017/4/12 0009 14:23 @@ -50,18 +50,8 @@ public int getLayoutId() { public void convertView(BaseViewHolder holder, BaseDialog dialog) { super.convertView(holder, dialog); holder.setText(R.id.tv_title_selector, title) - .setOnClickListener(R.id.iv_cancel_selector, new View.OnClickListener() { - @Override - public void onClick(View v) { - dismiss(); - } - }) - .setOnClickListener(R.id.tv_cancel_selector, new View.OnClickListener() { - @Override - public void onClick(View v) { - dismiss(); - } - }); + .setOnClickListener(R.id.iv_cancel_selector, v -> dismiss()) + .setOnClickListener(R.id.tv_cancel_selector, v -> dismiss()); RecyclerView recyclerView = holder.getView(R.id.recyclerView_selector); recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); @@ -70,18 +60,15 @@ public void onClick(View v) { } else { recyclerView.setAdapter(adapter = new RecyclerView.Adapter() { @Override - public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { + public BaseViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { return new BaseViewHolder(getLayoutInflater().inflate(itemLayoutId, parent, false)); } @Override - public void onBindViewHolder(final BaseViewHolder holder, final int position) { - holder.itemView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (itemClickListener != null) { - itemClickListener.onItemClick(v, holder, position, SelectorDialog.this); - } + public void onBindViewHolder(@NonNull final BaseViewHolder holder, final int position) { + holder.itemView.setOnClickListener(v -> { + if (itemClickListener != null) { + itemClickListener.onItemClick(v, holder, position, SelectorDialog.this); } }); diff --git a/library/src/main/java/cn/itsite/adialog/dialogfragment/BaseDialogFragment.java b/library/src/main/java/cn/itsite/adialog/dialogfragment/BaseDialogFragment.java index bd30e96..063c66d 100644 --- a/library/src/main/java/cn/itsite/adialog/dialogfragment/BaseDialogFragment.java +++ b/library/src/main/java/cn/itsite/adialog/dialogfragment/BaseDialogFragment.java @@ -4,19 +4,20 @@ import android.app.DialogFragment; import android.app.FragmentManager; import android.os.Bundle; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; + import cn.itsite.adialog.ADialogListener; -import cn.itsite.adialog.common.BaseViewHolder; import cn.itsite.adialog.R; +import cn.itsite.adialog.common.BaseViewHolder; import cn.itsite.adialog.common.Utils; public class BaseDialogFragment extends DialogFragment { diff --git a/library/src/main/java/cn/itsite/adialog/dialogfragment/SelectorDialogFragment.java b/library/src/main/java/cn/itsite/adialog/dialogfragment/SelectorDialogFragment.java index 1b51e80..00f3d8d 100644 --- a/library/src/main/java/cn/itsite/adialog/dialogfragment/SelectorDialogFragment.java +++ b/library/src/main/java/cn/itsite/adialog/dialogfragment/SelectorDialogFragment.java @@ -2,8 +2,9 @@ import android.app.Dialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import java.util.List; diff --git a/library/src/main/java/cn/itsite/adialog/support/ADialogListener.java b/library/src/main/java/cn/itsite/adialog/support/ADialogListener.java index c4dabc2..4093d91 100644 --- a/library/src/main/java/cn/itsite/adialog/support/ADialogListener.java +++ b/library/src/main/java/cn/itsite/adialog/support/ADialogListener.java @@ -1,9 +1,10 @@ package cn.itsite.adialog.support; import android.app.Dialog; -import android.support.v4.app.DialogFragment; import android.view.View; +import androidx.fragment.app.DialogFragment; + import cn.itsite.adialog.common.BaseViewHolder; /** diff --git a/library/src/main/java/cn/itsite/adialog/support/dialog/BaseDialog.java b/library/src/main/java/cn/itsite/adialog/support/dialog/BaseDialog.java index 6aee4a3..d958262 100644 --- a/library/src/main/java/cn/itsite/adialog/support/dialog/BaseDialog.java +++ b/library/src/main/java/cn/itsite/adialog/support/dialog/BaseDialog.java @@ -2,14 +2,15 @@ import android.content.Context; import android.os.Bundle; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; -import android.support.v7.app.AppCompatDialog; import android.view.Window; import android.view.WindowManager; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; +import androidx.appcompat.app.AppCompatDialog; + import cn.itsite.adialog.common.BaseViewHolder; import cn.itsite.adialog.common.Utils; import cn.itsite.adialog.support.ADialogListener; diff --git a/library/src/main/java/cn/itsite/adialog/support/dialog/LoadingDialog.java b/library/src/main/java/cn/itsite/adialog/support/dialog/LoadingDialog.java index 3cb6f6a..22df5b6 100644 --- a/library/src/main/java/cn/itsite/adialog/support/dialog/LoadingDialog.java +++ b/library/src/main/java/cn/itsite/adialog/support/dialog/LoadingDialog.java @@ -2,11 +2,12 @@ import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; + import cn.itsite.adialog.R; import cn.itsite.adialog.common.BaseViewHolder; @@ -18,7 +19,7 @@ */ public class LoadingDialog extends BaseDialog { private TextView tvLoading; - private String text = "玩命加载中…"; + private String text = ""; public LoadingDialog(@NonNull Context context) { super(context); @@ -48,7 +49,7 @@ protected void onCreate(Bundle savedInstanceState) { public void convertView(BaseViewHolder holder, BaseDialog dialog) { super.convertView(holder, dialog); tvLoading = holder.getView(R.id.tv_loading); - tvLoading.setText(text); + tvLoading.setText(R.string.loading_text); } public LoadingDialog setText(String s) { diff --git a/library/src/main/java/cn/itsite/adialog/support/dialog/SelectorDialog.java b/library/src/main/java/cn/itsite/adialog/support/dialog/SelectorDialog.java index d420f2a..df2c998 100644 --- a/library/src/main/java/cn/itsite/adialog/support/dialog/SelectorDialog.java +++ b/library/src/main/java/cn/itsite/adialog/support/dialog/SelectorDialog.java @@ -1,14 +1,15 @@ package cn.itsite.adialog.support.dialog; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import java.util.List; import cn.itsite.adialog.R; diff --git a/library/src/main/java/cn/itsite/adialog/support/dialogfragment/BaseDialogFragment.java b/library/src/main/java/cn/itsite/adialog/support/dialogfragment/BaseDialogFragment.java index a871cbe..912e3fd 100644 --- a/library/src/main/java/cn/itsite/adialog/support/dialogfragment/BaseDialogFragment.java +++ b/library/src/main/java/cn/itsite/adialog/support/dialogfragment/BaseDialogFragment.java @@ -2,19 +2,20 @@ import android.app.Dialog; import android.os.Bundle; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentManager; -import android.support.v7.app.AppCompatDialogFragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; +import androidx.appcompat.app.AppCompatDialogFragment; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentManager; + import cn.itsite.adialog.R; import cn.itsite.adialog.common.BaseViewHolder; import cn.itsite.adialog.common.Utils; diff --git a/library/src/main/java/cn/itsite/adialog/support/dialogfragment/SelectorDialogFragment.java b/library/src/main/java/cn/itsite/adialog/support/dialogfragment/SelectorDialogFragment.java index 4437e68..1f38e16 100644 --- a/library/src/main/java/cn/itsite/adialog/support/dialogfragment/SelectorDialogFragment.java +++ b/library/src/main/java/cn/itsite/adialog/support/dialogfragment/SelectorDialogFragment.java @@ -2,8 +2,9 @@ import android.app.Dialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import java.util.List; diff --git a/library/src/main/res/values/strings.xml b/library/src/main/res/values/strings.xml new file mode 100644 index 0000000..cca113b --- /dev/null +++ b/library/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + loading… +