csirkeautomata
csirkeautomata

Reputation: 177

How to change bottom navigation icon color if I change Fragment programmatically

I am using bottom navigation to change fragments. For whatever reason, I need to change Fragment if the user taps a particular button. This method working fine, except a little aesthetic problem. If I change fragment programmatically, the bottom navigation icon color won't change.

For handling color change, I am using selector XML right now, but I am ready to use other solutions, to handle this little problem.

Upvotes: 1

Views: 1289

Answers (1)

UD..
UD..

Reputation: 80

please follow this code, it may help you bottomNavigationView.setSelectedItemId(R.id.navigation_home);

Upvotes: 2

Related Questions