Fix showing empty FAB

This commit is contained in:
serso
2016-02-22 12:04:52 +01:00
parent fe27c1b443
commit 77b38bfc78
2 changed files with 4 additions and 0 deletions

View File

@@ -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;