From 77b38bfc787cee3b4e399a3ed1e211fa3853b31c Mon Sep 17 00:00:00 2001 From: serso Date: Mon, 22 Feb 2016 12:04:52 +0100 Subject: [PATCH] Fix showing empty FAB --- .../solovyev/android/calculator/view/PagerViewFabBehavior.java | 3 +++ app/src/main/res/values/styles.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/org/solovyev/android/calculator/view/PagerViewFabBehavior.java b/app/src/main/java/org/solovyev/android/calculator/view/PagerViewFabBehavior.java index f46e04a5..ac734aae 100644 --- a/app/src/main/java/org/solovyev/android/calculator/view/PagerViewFabBehavior.java +++ b/app/src/main/java/org/solovyev/android/calculator/view/PagerViewFabBehavior.java @@ -22,6 +22,9 @@ public class PagerViewFabBehavior extends FloatingActionButton.Behavior { @Override public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, FloatingActionButton child, View directTargetChild, View target, int nestedScrollAxes) { + if (!child.isClickable()) { + return false; + } switch (nestedScrollAxes) { case ViewCompat.SCROLL_AXIS_HORIZONTAL: return target instanceof ViewPager; diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 9f69cadf..19fef6e7 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -280,6 +280,7 @@ bottom|end 16dp gone + false ?attr/cpp_fab_bg