I'm trying to fill the TabHost
with TabSpec
's, all is fine but the icons inserted with setIndicator(text,drawable)
are not shown. I tried using my own pics, as well as the ones from android - none worked.
Here's my code:
tabs = (TabHost)findViewById( android.R.id.tabhost );
tabs.setup();
TabHost.TabSpec spec;
spec = tabs.newTabSpec( "destinationTab" )
.setContent( R.id.destinationTab )
.setIndicator( getString( R.string.enter_target ), getResources().getDrawable( android.R.drawable.ic_secure ) );
tabsDef.put( "destinationTab", R.id.destinationTab );
tabs.addTab( spec );
spec = tabs.newTabSpec( "freeHuntTab" )
.setContent( R.id.freeHuntTab )
.setIndicator( getString( R.string.free_hunting_button ), getResources().getDrawable( R.drawable.ic_my_own ) );
tabsDef.put( "freeHuntTab", R.id.freeHuntTab );
tabs.addTab( spec );
what am I missing?
TIA