Custom Auto Hide Floatingactionbutton Behavior Is Not Working
I'm trying to hide a FloatingActionButton when a NestedScrollView scroll down, and revealed itself when NestedScrollView scroll up. Here is my layout:
Solution 1:
Take a look at what @woxingxiao is saying here
Pretty much onNestedScroll
won't get fired if the visibility of the button is GONE
. So, replace:
child.hide();
to:
child.hide(newFloatingActionButton.OnVisibilityChangedListener() {
@OverridepublicvoidonHidden(FloatingActionButton fab) {
super.onHidden(fab);
fab.setVisibility(View.INVISIBLE);
}
});
Post a Comment for "Custom Auto Hide Floatingactionbutton Behavior Is Not Working"