sephiroth74 / Material-BottomNavigation

Bottom Navigation widget component inspired by the Google Material Design Guidelines at https://www.google.com/design/spec/components/bottom-navigation.html
MIT License
1.47k stars 236 forks source link

Auto hide/show with CollapsingToolbarLayout #64

Open MRezaNasirloo opened 7 years ago

MRezaNasirloo commented 7 years ago

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.

ipereziriarte commented 6 years ago

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

MRezaNasirloo commented 6 years ago

@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.

ipereziriarte commented 6 years ago

@MRezaNasirloo Thanks! Nice workaround :)

erichps114 commented 5 years ago

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

julianctni commented 5 years ago

@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!