Setting tab heights

by Mark Murphy » Mon, 10 Aug 2009 22:52:25 GMT

Sponsored Links
 The only way I know of to change the heights of the tabs in a TabWidget
is via code akin to:

        .setLayoutParams(new LinearLayout.LayoutParams(width,height));

(and iterate from 0 to whatever to do all of the tabs)

This feels fragile. Is there a better solution, preferably one heartily
endorsed by the core Android team? I'm getting inquiries about this and
would like to address it in a book update someday.


Mark Murphy (a Commons Guy)  | 

Warescription: Three Android Books, Plus Updates, $35/Year


Setting tab heights

by nEx.Software » Tue, 11 Aug 2009 05:54:16 GMT

 Personally, I subclassed TabHost, and TabWidget and provided my own
TabIndicator. Probably a lot more work than I had to do, but I am
custom drawing my tabs so I was OK with a little extra work for full


Sponsored Links

Setting tab heights

by nEx.Software » Tue, 11 Aug 2009 05:58:03 GMT

 On second thought, I actually pulled the TabHost and TabWidget code
from the Android Open Source Project. I suppose I didn't subclass,

On Aug 10, 2:53pm, "nEx.Software" <>


Other Threads

1. Install Debian on Android


Is this link: still updated?

or any more recent article/tutorial?



2. How can I make an Activity transparent/invisible

I have two activities. One sends an jpeg uri to the other and it takes
some time to decode the jpeg and put it on the screen. I get a black
screen during the loadup I want to get rid of.

I have tried to use setBackgroundDrawable but it does not do the

getWindow().setBackgroundDrawable(new ColorDrawable(0));

Is there any way to make the window of the second activity transparent/


BR - Maxi


3. How compile the apk file?

4. Black Screen problem with graphics update using unlockCanvasAndPost()

5. run app after installation using PACKAGE_ADDED or other mechanism?

6. 4 Track Recorder and Video Player...

7. get indication