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 @Override
public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout,
FloatingActionButton child, View directTargetChild, View target, int nestedScrollAxes) { FloatingActionButton child, View directTargetChild, View target, int nestedScrollAxes) {
if (!child.isClickable()) {
return false;
}
switch (nestedScrollAxes) { switch (nestedScrollAxes) {
case ViewCompat.SCROLL_AXIS_HORIZONTAL: case ViewCompat.SCROLL_AXIS_HORIZONTAL:
return target instanceof ViewPager; return target instanceof ViewPager;

View File

@ -280,6 +280,7 @@
<item name="android:layout_gravity">bottom|end</item> <item name="android:layout_gravity">bottom|end</item>
<item name="android:layout_margin">16dp</item> <item name="android:layout_margin">16dp</item>
<item name="android:visibility">gone</item> <item name="android:visibility">gone</item>
<item name="android:clickable">false</item>
<item name="backgroundTint">?attr/cpp_fab_bg</item> <item name="backgroundTint">?attr/cpp_fab_bg</item>
</style> </style>