Reducing the size of the tabs for a tabview

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Reducing the size of the tabs for a tabview

Postby ErnestoGuevara » Thu Mar 05, 2009 3:57 am

I'm using tabs on my latest project, and I desperately need to come up with about 15px more of vertical room, so that my users don't have to scroll to see the bottom half of a button.

I notice that my TabSpec has given me tabs that have a huge amount of empty space - they have about 3 times and much height as they need to comfortably show the tab labels. I've tried 37 different ways to shrink the tabs, and searched all across the internet, all to no avail.

I assumed it would going to start with tabHost.getTabWidget().set... but I can't find anything.

Anyone have any ideas?
Search "Awesome Android Apps" in the market
http://www.awesomeandroidapps.com
ErnestoGuevara
Experienced Developer
Experienced Developer
 
Posts: 75
Joined: Thu Jan 08, 2009 2:02 am

Top

Postby ErnestoGuevara » Thu Mar 05, 2009 4:06 am

Figured out that for each tab I add, I can call
tabHost.getTabWidget().getChildAt(0).setLayoutParams(new LinearLayout.LayoutParams(160,40));
But when the tab isn't highlighted, it ends up looking ugly - there's a light grey stripe running horizontally through the middle of the background.

???
Search "Awesome Android Apps" in the market
http://www.awesomeandroidapps.com
ErnestoGuevara
Experienced Developer
Experienced Developer
 
Posts: 75
Joined: Thu Jan 08, 2009 2:02 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests