Try:

<selector xmlns:android="http://schemas.android.com/apk/res/android";>
        <item
                android:state_selected="true"
                android:state_pressed="false"
                android:drawable="@drawable/icon_selected"
        />
        <item
                android:drawable="@drawable/icon"
        />
</selector>


On Thu, Feb 17, 2011 at 8:48 AM, cool.manish <mannishga...@gmail.com> wrote:
> Hi,
>
> I want to change the tab image on enable and disable. I am trying to
> use following xml. but it is not working
>
> tabhost.newTabSpec(mailboxTabId).setIndicator(mailboxTabId,
>
> getResources().getDrawable(R.layout.mailbox_tab_state)).setContent(mailboxIntent);
>
> <?xml version="1.0" encoding="utf-8"?>
> <selector xmlns:android="http://schemas.android.com/apk/res/android";>
>        <item android:state_pressed="true" android:drawable="@drawable/
> icon_mailbox_reg" /> <!-- pressed -->
>        <item android:state_pressed="false" android:drawable="@drawable/
> icon_mailbox"  />
> </selector>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 3.1 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to