I\'ve been using this FloatingActionButton.Behavior for many months now, it takes care of hiding and showing the FAB of my application. Never had an issue.
p
For 25.1.0
, CoordinatorLayout
is skipping views set to GONE
when looking for behaviors to call in its onNestedScroll
method.
The solution is replacing FAB's visibility GONE
with INVISIBLE
.
Simply, change:
child.hide();
to:
child.hide(new FloatingActionButton.OnVisibilityChangedListener() {
@Override
public void onHidden(FloatingActionButton fab) {
super.onHidden(fab);
fab.setVisibility(View.INVISIBLE);
}
});