ittianyu / BottomNavigationViewEx

An android lib for enhancing BottomNavigationView. 一个增强BottomNavigationView的安卓库。
MIT License
3.47k stars 558 forks source link

Ripple effect #4

Closed amouly closed 7 years ago

amouly commented 7 years ago

There is a way to maintain the Ripple Effect after removing the shifting mode?

I'm using this configuration:

bottomNavigationView.enableAnimation(false);
bottomNavigationView.enableShiftingMode(false);
bottomNavigationView.enableItemShiftingMode(false);
bottomNavigationView.setTextVisibility(true);
bottomNavigationView.setIconVisibility(true);

I don't want any kind of Shifting but I want to continue having the ripple effect.

Thank you and amazing job!

ittianyu commented 7 years ago

Using these api will not cause the ripple effect to disappear. I test in Android 5.0 and it works well. The ripple effect was supported from Android 5.0. So you can't see it on Android 4.x. You can see this image.

And you just need call these api. The text and icon are visible by default.

bottomNavigationView.enableAnimation(false);
bottomNavigationView.enableShiftingMode(false);
bottomNavigationView.enableItemShiftingMode(false);

I'm glad to see someone using my library.

amouly commented 7 years ago

@ittianyu the library works fine, it was my issue setting the same color on the background.

Again, thank you for your effort and be sure that this library saved my life 😄 .

luneice commented 5 years ago

if you wan to custom the menu item click ripper, you can define style in styles.xml like this so set the BottomNavigationMenuEX theme in xml, it will work!