I\'m trying to hide a FloatingActionButton when a NestedScrollView scroll down, and revealed itself when NestedScrollView scroll up.
Here is my layout:
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(new FloatingActionButton.OnVisibilityChangedListener() {
@Override
public void onHidden(FloatingActionButton fab) {
super.onHidden(fab);
fab.setVisibility(View.INVISIBLE);
}
});