Hello,

I am trying to change the Icon of one of the tabs of tab host at run
time. I am not able to figure out hwo to do with the widget. could
some one let me know how its done ?


      spec = tabHost.newTabSpec("hello").setIndicator("hello",
            res.getDrawable(R.drawable.tab1)).setContent(intent);
      tabHost.addTab(spec)


The xml file is as below
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android";>
    <!-- When selected, use grey -->
    <item android:drawable="@drawable/icon1"
          android:state_selected="true" />
    <!-- When not selected, use white-->
    <item android:drawable="@drawable/icon1" />
</selector>

Thanks ,
Titus

-- 
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

Reply via email to