diff --git a/README.md b/README.md index 09d256a..62984d6 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It comes with following features: The Crossfader Library is pushed to [Maven Central](http://search.maven.org/#search|ga|1|g%3A%22com.mikepenz%22), so you just need to add the following dependency to your `build.gradle`. ```javascript -compile('com.mikepenz:crossfader:1.3.3@aar') { +compile('com.mikepenz:crossfader:1.3.4@aar') { transitive = true } ``` diff --git a/app/build.gradle b/app/build.gradle index ce2e23f..b4ffea7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { applicationId "com.mikepenz.crossfader.app" minSdkVersion 10 targetSdkVersion 23 - versionCode 133 - versionName '1.3.3' + versionCode 134 + versionName '1.3.4' applicationVariants.all { variant -> variant.outputs.each { output -> diff --git a/build.gradle b/build.gradle index fb73e3c..04b5c58 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:2.0.0-beta5' + classpath 'com.android.tools.build:gradle:2.0.0-beta6' classpath 'com.novoda:bintray-release:0.3.4' } } diff --git a/gradle.properties b/gradle.properties index 1d12c5d..d433281 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Maven stuff -VERSION_NAME=1.3.3 -VERSION_CODE=133 +VERSION_NAME=1.3.4 +VERSION_CODE=134 GROUP=com.mikepenz POM_DESCRIPTION=Crossfader Library diff --git a/library/build.gradle b/library/build.gradle index c3b839d..a5f972b 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -8,8 +8,8 @@ android { defaultConfig { minSdkVersion 10 targetSdkVersion 23 - versionCode 133 - versionName '1.3.3' + versionCode 134 + versionName '1.3.4' } buildTypes { release { diff --git a/library/src/main/java/com/mikepenz/crossfader/view/CrossFadeSlidingPaneLayout.java b/library/src/main/java/com/mikepenz/crossfader/view/CrossFadeSlidingPaneLayout.java index 18fa410..385dfd1 100644 --- a/library/src/main/java/com/mikepenz/crossfader/view/CrossFadeSlidingPaneLayout.java +++ b/library/src/main/java/com/mikepenz/crossfader/view/CrossFadeSlidingPaneLayout.java @@ -144,8 +144,36 @@ public void setOffset(float slideOffset) { } partialView.setVisibility(isOpen() ? View.GONE : VISIBLE); + //if the fullView is hidden we prevent the click on all its views and subviews + //otherwhise enable it again + if (slideOffset == 0 && fullView.isEnabled() || slideOffset != 0 && !fullView.isEnabled()) { + enableDisableView(fullView, slideOffset != 0); + } + } + + /** + * helper method to disable a view and all its subviews + * + * @param view + * @param enabled + */ + private void enableDisableView(View view, boolean enabled) { + view.setEnabled(enabled); + if (view instanceof ViewGroup) { + ViewGroup group = (ViewGroup) view; + + for (int idx = 0; idx < group.getChildCount(); idx++) { + enableDisableView(group.getChildAt(idx), enabled); + } + } } + /** + * set the alpha on API 10 devices + * + * @param v + * @param value + */ private void updateAlphaApi10(View v, float value) { AlphaAnimation alpha = new AlphaAnimation(value, value); alpha.setDuration(0); // Make animation instant @@ -153,6 +181,11 @@ private void updateAlphaApi10(View v, float value) { v.startAnimation(alpha); } + /** + * set the view visibility on pre honeycomb + * + * @param slidingPaneOpened + */ private void updatePartialViewVisibilityPreHoneycomb(boolean slidingPaneOpened) { // below API 11 the top view must be moved so it does not consume clicks intended for the bottom view // this applies curiously even when setting its visibility to GONE diff --git a/library/src/main/res/values/library_crossfader_strings.xml b/library/src/main/res/values/library_crossfader_strings.xml index 21b8e1f..f58b8ca 100755 --- a/library/src/main/res/values/library_crossfader_strings.xml +++ b/library/src/main/res/values/library_crossfader_strings.xml @@ -10,7 +10,7 @@ Crossfader ]]> - 1.3.3 + 1.3.4 https://github.com/mikepenz/Crossfader apache_2_0 true