diff --git a/build.gradle b/build.gradle index d4dcff1..1141f80 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath "com.android.tools.build:gradle:4.0.1" + classpath "com.android.tools.build:gradle:4.1.2" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 22543d0..65b684d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/mylibrary/build.gradle b/mylibrary/build.gradle index 759132e..83b95b6 100644 --- a/mylibrary/build.gradle +++ b/mylibrary/build.gradle @@ -9,8 +9,8 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 30 - versionCode 1 - versionName "1.0" + versionCode 2 + versionName "1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" diff --git a/mylibrary/src/main/java/com/zc/mylibrary/DownloadProgressDialogUtils.java b/mylibrary/src/main/java/com/zc/mylibrary/DownloadProgressDialogUtils.java index 767ac68..be88c0b 100644 --- a/mylibrary/src/main/java/com/zc/mylibrary/DownloadProgressDialogUtils.java +++ b/mylibrary/src/main/java/com/zc/mylibrary/DownloadProgressDialogUtils.java @@ -27,6 +27,21 @@ public static void showProgressDialog(Context mContext, String message) { } } + public static void showCircleProgressDialog(int maxValue,Context mContext, String message) { + closeProgressDialog(); + progressDialog = new ProgressDialog(mContext,R.style.Theme_MaterialComponents_Light_Dialog); + progressDialog.setCanceledOnTouchOutside(false); + progressDialog.setMessage(message); + progressDialog.setCancelable(true); + progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); + progressDialog.setMax(maxValue); + if (null != progressDialog + && !progressDialog.isShowing() + && !((Activity)mContext).isFinishing()) {//检查activity是否finishing!!! + progressDialog.show(); + } + } + public static void updateProgress(float value){ progressDialog.setProgress((int) value); }