0

Can we change the place of text and image in tabs?

Because images which i have used are slightly big in dimensions and hiding the title of my tabs.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Varundroid
  • 9,135
  • 14
  • 63
  • 93

2 Answers2

1

For Changing Image and Text View in Tab Bar you need to write Custom Tab Bar. Check this link for Custom Tab Bar

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Venky
  • 11,049
  • 5
  • 49
  • 66
0

All you have to do is increase the height of your tabs by calling tabHost.getTabWidget().getChildAt(i).getLayoutParams().height

Eg. In your main class which extends TabActivity, implement this code in your into your TabHost :

TabHost tabHost;


       for (int i = 0; i < getTabWidget().getTabCount(); i++ ) {

        tabHost.getTabWidget().getChildAt(i).getLayoutParams().height = 100;
    }

Increase the height if it's not big enough for your custom image. Happy coding!

Stark
  • 2,581
  • 2
  • 17
  • 20