Closed Ayesha-Fazal closed 6 years ago
setCurrentItem
should work, but be sure to execute the code when the view is already displayed.
setCurrentItem doesn't work...
I have it such that when I click on a different tab, the fragment changes (and that works) but the bottomNavigation stays at its initial state.
is it possible to change the color of selected item in bottom navigation although i am using AHBottomNavigation
Current Behaviour: I have 5 items in bottom navigation view, by default 1st item is coloured (Active or enable) when user comes here first.
Goal: In one scenario user can come to the app from notification and lands on 4th fragment. I want to make 4th fragment (3rd position in bottom view) coloured.
Issue: I tried using setCurrentItem(3) but still shows first item coloured. Also tried bottomNavigation.enableItemAtPosition(3); but same result.
How to make this work ?