Reputation: 11107
I want to add an image to TabHost
.
This is my code:
tabHost.addTab(tabHost.newTabSpec("tab1").setContent(new Intent(this, DealCities.class)).setIndicator("Deals"));
Upvotes: 0
Views: 415
Reputation: 146
Try this:
tabHost.addTab(tabHost.newTabSpec("tab1").setContent(new Intent(this, DealCities.class)).setIndicator("tab1", this.getResources().getDrawable(R.drawable.tab1_icon))
assuming that you have a drawable resource "tab1_icon"...
Igor
Upvotes: 1