Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Created Oct 20, 2016
Embed
What would you like to do?
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white" android:state_enabled="true" />
<item android:color="@color/colorPrimaryDark" android:state_enabled="false" />
</selector>
@sijangurung
Copy link

sijangurung commented Jan 24, 2017

You must change the selector from state_enabled to state_checked ( in your menu xml, all the items are enables, so it will show the same color for all the items in bottomNavigationView)

Copy link

ghost commented Feb 14, 2017

Where do you need to create this selector.xml? Under menu folder?

@Phil795
Copy link

Phil795 commented Jun 25, 2017

@EzekielHawk
You need to add this selector to /res/drawable

@caioiglesias
Copy link

caioiglesias commented Nov 4, 2018

You must change the selector from state_enabled to state_checked ( in your menu xml, all the items are enables, so it will show the same color for all the items in bottomNavigationView)

Yes to this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment