diff --git a/app/build.gradle b/app/build.gradle index e6ebf9d..cca86c2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 29 - buildToolsVersion "29.0.2" + buildToolsVersion "29.0.3" defaultConfig { applicationId "com.lamonjush.fullscreenloadingdialog" minSdkVersion 21 diff --git a/build.gradle b/build.gradle index a158142..28e3849 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:4.0.0' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/fullscreenloadingdialog/build.gradle b/fullscreenloadingdialog/build.gradle index ca2d851..c932d9e 100644 --- a/fullscreenloadingdialog/build.gradle +++ b/fullscreenloadingdialog/build.gradle @@ -5,7 +5,7 @@ group='com.github.fahim44' android { compileSdkVersion 29 - buildToolsVersion "29.0.2" + buildToolsVersion "29.0.3" defaultConfig { diff --git a/fullscreenloadingdialog/src/main/java/com/lamonjush/fullscreenloadingdialog/FullScreenLoadingDialog.java b/fullscreenloadingdialog/src/main/java/com/lamonjush/fullscreenloadingdialog/FullScreenLoadingDialog.java index c66a785..694faa1 100644 --- a/fullscreenloadingdialog/src/main/java/com/lamonjush/fullscreenloadingdialog/FullScreenLoadingDialog.java +++ b/fullscreenloadingdialog/src/main/java/com/lamonjush/fullscreenloadingdialog/FullScreenLoadingDialog.java @@ -102,7 +102,7 @@ public void show(Context context) { } catch (Exception ignored) { } }, 50); - }else { + } else { showLoader(context, builder); } @@ -117,11 +117,18 @@ private void showLoader(Context context, AlertDialog.Builder builder) { dialog.show(); } + public boolean isShowing() { + if (dialog != null) + return dialog.isShowing(); + return false; + } + public void dismiss() { if (dialog != null) { new Handler().postDelayed(() -> { try { - dialog.dismiss(); + if (dialog != null) + dialog.dismiss(); dialog = null; } catch (Exception ignored) { } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 733fa9d..69c7af4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Feb 20 21:49:41 BDT 2020 +#Sat May 30 14:47:06 BDT 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 3d7943d..0a99060 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ include ':app', ':fullscreenloadingdialog' -rootProject.name='FullScreenLoadingDialog' +rootProject.name='FullScreenLoadingDialog' \ No newline at end of file