0

Its not duplicate of How to disable BottomNavigationView shift mode?

I'm using BottomNavigationView in my application but Shifting Mode not works , just shows ripple with no animation !

I tested this code but not helped !

 BottomNavigationMenuView menuView = (BottomNavigationMenuView) navigation.getChildAt(0);

  for (int i = 0; i < menuView.getChildCount(); i++) {
    BottomNavigationItemView item = (BottomNavigationItemView) menuView.getChildAt(i);
    item.setShifting(true);
  }
implementation 'com.android.support:design:28.0.0'

my xml :

    <android.support.design.widget.BottomNavigationView
        android:id="@+id/navigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_gravity="bottom"
        android:background="@color/blue_grey_700"
        app:menu="@menu/menu_bottom_navigation_shifting" />

What i want and my result !

1 Answers1

0

Sifting mode is your default one. You no need to active shifting mode. If you want to remove shifting mode then you have to do some modification.

If you did any modification on BottomNavigationView object then remove it and try again.

Mehul Kabaria
  • 6,404
  • 4
  • 25
  • 50