my problem is I want to hide the Love FAB when the user scroll down to reviews and shows again when the user goes up again how can i achieve this behaviour ?
and this is what looks like now
my XML file is this:
I cannot post it here because it's so long.
Thanks to Barns I have come with the solution
by set the visibility property to GONE
or INVISIBLE
and implementing the nestedScrollView.setOnScrollChangeListener
this code sample works fine for me:
nestedScrollView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
@Override
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
//the Y-axis scroll origin value
if( scrollY > 275) {
Log.i("Scroll", "onScrollChange: 275 Reached");
loveFab.setVisibility(View.INVISIBLE);
}
else
loveFab.setVisibility(View.VISIBLE);
}
});