Material-BottomNavigation icon indicating copy to clipboard operation
Material-BottomNavigation copied to clipboard

Auto hide/show with CollapsingToolbarLayout

Open MRezaNasirloo opened this issue 7 years ago • 5 comments

The auto hide/show does not work when adding app:layout_scrollFlags="scroll" to CollapsingToolbarLayout

Looks like other button navigation libraries have this issue too.

MRezaNasirloo avatar Jun 17 '17 13:06 MRezaNasirloo

👍 It's happening to me too. Any chance to fix this?

ipereziriarte avatar Apr 06 '18 17:04 ipereziriarte

@ipereziriarte You can fix it by adding a onScrollListener to your recyclerview or whatever that you have which scrolls, then listen for up and down scroll events and show/hide it there. It's not elegant but it works.

MRezaNasirloo avatar Apr 06 '18 20:04 MRezaNasirloo

@MRezaNasirloo Thanks! Nice workaround :)

ipereziriarte avatar Apr 07 '18 17:04 ipereziriarte

How to show/hide the bottom navigation programatically? I couldn't find any docs

erichps114 avatar Mar 09 '19 20:03 erichps114

@erichps114 by calling setExpanded(boolean expanded, boolean animate) on the BottomNavigation Object. I tried it inside the onScrolled Method of OnScrollListener in RecyclerView. But it seems, that there is always a small delay when hiding/showing the bottom nav :/

Would be nice getting this fixed!

julianctni avatar Sep 18 '19 10:09 julianctni