Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Created October 20, 2016 11:44
Show Gist options
  • Select an option

  • Save hitherejoe/cc0dbc84c5397ee630d0b9298112d54c to your computer and use it in GitHub Desktop.

Select an option

Save hitherejoe/cc0dbc84c5397ee630d0b9298112d54c to your computer and use it in GitHub Desktop.
<?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
Copy Markdown

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)

ghost commented Feb 14, 2017

Copy link
Copy Markdown

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

@Phil795

Phil795 commented Jun 25, 2017

Copy link
Copy Markdown

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

@caioiglesias

Copy link
Copy Markdown

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