I've setup my tabs as follows:
spec = tabHost.newTabSpec("tab1").setIndicator("Tab 1").setContent(intent);
tabHost.addTab(spec);
And now I have a tab that has no icon, only a title, but it just leaves an icon-sized blank space with the Title at the bottom - I tried adjusting the layout_height in the xml, but then the text is gone because it is rendered below the cutoff point.
How can I change the size of a tab, and have the title displayed without an icon?
Changing the TabWidget layout_height and gravity in xml worked for me. The text does not center in the tab but is aligned along the bottom just like before.
The answer is simple: You can't. The default android tab will always leave some blank space for the image. But you can create your own tabs to compensate that "restriction" in the default tab. Here is a very good tutorial to create custom tabs.
http://joshclemm.com/blog/?p=136
Good luck, Arkde
Change your tabhost size from layout and for display only Tab Tile write code as per below code snippets