Search code examples
androidandroid-support-libraryandroid-bottomnav

Manually switch Android BottomNavigationView


Is there a simple way to manually switch between items of a BottomNavigationView?

I couldn't find any relevant method in the source code.


Solution

  • Ok, I found a temporary workaround for this until an official update addresses this issue.

    ((BottomNavigationMenuView) bottomNav.getChildAt(0)).getChildAt(ITEM_INDEX).callOnClick();