Skip to content

Commit

Permalink
add isShowing
Browse files Browse the repository at this point in the history
  • Loading branch information
fahim44 committed Jul 4, 2020
1 parent e4abecb commit 8843312
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fullscreenloadingdialog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ group='com.github.fahim44'

android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
buildToolsVersion "29.0.3"


defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void show(Context context) {
} catch (Exception ignored) {
}
}, 50);
}else {
} else {
showLoader(context, builder);
}

Expand All @@ -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) {
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':app', ':fullscreenloadingdialog'
rootProject.name='FullScreenLoadingDialog'
rootProject.name='FullScreenLoadingDialog'

0 comments on commit 8843312

Please sign in to comment.