diff --git a/build.gradle b/build.gradle index 5fd14a7..a65373c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,3 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - buildscript { repositories { jcenter() diff --git a/customalert/build.gradle b/customalert/build.gradle index 31b090f..89686c6 100644 --- a/customalert/build.gradle +++ b/customalert/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' group='com.github.searchy2' -version = '1.5' +version = '1.6' android { compileSdkVersion 25 diff --git a/customalert/src/main/java/stream/customalert/CustomAlertDialogue.java b/customalert/src/main/java/stream/customalert/CustomAlertDialogue.java index 75d99cc..f68c1d0 100644 --- a/customalert/src/main/java/stream/customalert/CustomAlertDialogue.java +++ b/customalert/src/main/java/stream/customalert/CustomAlertDialogue.java @@ -62,13 +62,16 @@ public void onCreate(@Nullable Bundle savedInstanceState) { } setStyle(DialogFragment.STYLE_NO_TITLE, R.style.CustomDialog); setRetainInstance(true); - if (builder.getCancelable() == false) - { - this.setCancelable(false); - } - else + if (builder != null) { - this.setCancelable(true); + if (!builder.getCancelable()) + { + this.setCancelable(false); + } + else + { + this.setCancelable(true); + } } super.onCreate(savedInstanceState); }