Skip to content

Instantly share code, notes, and snippets.

@rahulpandey
Created September 4, 2015 06:52
Show Gist options
  • Save rahulpandey/14c937fbc632de3d3498 to your computer and use it in GitHub Desktop.
Save rahulpandey/14c937fbc632de3d3498 to your computer and use it in GitHub Desktop.
//TabLayout text color selector when using cutom view
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Active tab -->
<item android:color="@android:color/holo_red_dark" android:state_focused="false" android:state_pressed="false" android:state_selected="true" />
<!-- Inactive tab -->
<item android:color="#000" android:state_focused="false" android:state_pressed="false" android:state_selected="false" />
<!-- Pressed tab -->
<item android:color="#000" android:state_pressed="true" />
<!-- Selected tab (using d-pad) -->
<item android:color="@android:color/holo_red_dark" android:state_focused="true" android:state_pressed="false" android:state_selected="true" />
</selector>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment