Hi Mark, Thanks for your reply. Its working.
I have some more queries: 1. My tab is displaying some text which consuming more than the available space because of it on focused tab text is scrolling. I want to display this text as multiline. Is it possible? 2. I have used a grid view in which every cell is a button. I want to change the image on click of a button. I try to use same state as mentioned in your reply. but it has not worked. 3. We have some need to display multiline text on Button and both line having different font. We googled and find out it could be done using HTML. is there any other way also? On Feb 17, 6:51 pm, Mark Murphy <[email protected]> wrote: > 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 <[email protected]> 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 [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _Android Programming Tutorials_ Version 3.1 Available!- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

