I am trying to change the icon of one of the tabs of a tab node at runtime. I can’t figure out what to do with widgets. could anyone let me know how this is done?
spec = tabHost.newTabSpec("hello").setIndicator("hello",
res.getDrawable(R.drawable.tab1)).setContent(intent);
tabHost.addTab(spec)
The xml file looks like this: selector xmlns: android = "http://schemas.android.com/apk/res/android" - If selected, use gray - item android: drawable = "@ drawable / icon1" android: state_selected = " true "/"> - If you have not selected, item android: drawable = "@ drawable / icon1" / Selector
Thanks Titus
Titus source
share