diff --git a/.idea/misc.xml b/.idea/misc.xml index 9503cdd..ff4618c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml index 68c55a8..d07cb93 100644 --- a/app/src/main/res/layout/content_main.xml +++ b/app/src/main/res/layout/content_main.xml @@ -21,7 +21,7 @@ app:inner_text_size="16sp" app:inner_text_top_padding="18dp" app:inner_text_bottom_padding="18dp" - app:inner_text_background="@drawable/shape_rounded2" + app:inner_text_background="@drawable/shape_rounded" app:button_image_disabled="@drawable/ic_lock_open_black_24dp" app:button_image_enabled="@drawable/ic_lock_outline_black_24dp" app:button_left_padding="20dp" diff --git a/swipe-button/build.gradle b/swipe-button/build.gradle index 45c2d38..912b9db 100644 --- a/swipe-button/build.gradle +++ b/swipe-button/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'com.jfrog.bintray' apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'gnag' -version = '0.4.0' +version = '0.4.1' group = 'com.ebanx' android { @@ -103,7 +103,7 @@ install { packaging 'aar' groupId 'com.ebanx' artifactId 'swipe-button' - version '0.4.0' + version '0.4.1' licenses { license { diff --git a/swipe-button/src/main/java/com/ebanx/swipebtn/SwipeButton.java b/swipe-button/src/main/java/com/ebanx/swipebtn/SwipeButton.java index 6acc24a..e51957c 100644 --- a/swipe-button/src/main/java/com/ebanx/swipebtn/SwipeButton.java +++ b/swipe-button/src/main/java/com/ebanx/swipebtn/SwipeButton.java @@ -256,7 +256,10 @@ public void onAnimationEnd(Animator animation) { active = true; slidingButton.setImageDrawable(enabledDrawable); - onStateChangeListener.onStateChange(active); + + if(onStateChangeListener != null) { + onStateChangeListener.onStateChange(active); + } } }); @@ -306,7 +309,10 @@ public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); active = false; slidingButton.setImageDrawable(disabledDrawable); - onStateChangeListener.onStateChange(active); + + if(onStateChangeListener != null) { + onStateChangeListener.onStateChange(active); + } } });