views:

35

answers:

1

Hi all

I'm wondering how to suppress the label on the tabs I want only an icon

    intent = new Intent().setClass(this, Test.class);
    spec = tabHost.newTabSpec("test").setIndicator("test", 
                    res.getDrawable(R.drawable.ic_tab_test))
                  .setContent(intent);
    tabHost.addTab(spec);

I have an xml file for each tab describing the icon All works perfectly except I want to have ONLY the icon, not the label

Thanx

A: 

Try using an empty string for the indicator...

intent = new Intent().setClass(this, Test.class);
spec = tabHost.newTabSpec("test").setIndicator("", 
                res.getDrawable(R.drawable.ic_tab_test))
              .setContent(intent);
tabHost.addTab(spec);
Quintin Robinson
So how can I force my icon to cover all the tab (fill the blank left by the discarded label)
superseed77
@superseed77 I'm not at a computer right now that I can verify but I believe that modifying the `layout_height` of the `TabWidget` will adjust the tab sizes down to fill the space that might have been used for text.. this all depends on the image sizes you use for your tabs.
Quintin Robinson