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);
}
});
I have absolutely the same problem, looks like there is a bug in 'support-design package'. The only thing that we can do now, I believe, is rollback to one of previous versions. I decided to use the following:
compile 'com.android.support:design:25.0.1'