Fix showing empty FAB
This commit is contained in:
parent
fe27c1b443
commit
77b38bfc78
@ -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;
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user