Hi all,
I'm trying to get my tabicon to change when a tab is pressed (i.e. when it changes color when you press the tab, but haven't released yet). I've created a selector as follows:
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Non focused states -->
<item android:state_focused="false"
android:state_selected="false"
android:state_pressed="false"
android:drawable="@drawable/ic_tab_icon1" />
<item android:state_focused="false"
android:state_selected="true"
android:state_pressed="false"
android:drawable="@drawable/ic_tab_icon2" />
<!-- Focused states -->
<item android:state_focused="true"
android:state_selected="false"
android:state_pressed="false"
android:drawable="@drawable/ic_tab_icon3" />
<item android:state_focused="true"
android:state_selected="true"
android:state_pressed="false"
android:drawable="@drawable/ic_tab_icon4" />
<!-- Pressed -->
<item android:state_pressed="true"
android:drawable="@drawable/ic_tab_icon5" />
</selector>
However, for some reason only the first two states are reached (only icon1 and icon 2 are used). Can anyone tell me what the correct state is for a "pressed but not selected" tab?
*Edited to clarify new situation