views:

21

answers:

0

My Android app, which uses a TabActivity to display its contents, has 4 tabs which all use a state-list drawable for the icon. They all have the same structure, just with different images:

<?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
        <item android:drawable="@drawable/icon_options_dark" android:state_selected="true" android:state_focused="false" />
        <item android:drawable="@drawable/icon_options_white" />
</selector>`

However, when selecting tabs with the trackball on my HTC Desire (green highlight), the dark image is used instead of the light one. As soon as a tab is actually selected, it does become white. What am I doing wrong?