[android-developers] Re: how to set the size of tab in tabHost?

2014-04-10 Thread sunita
Bellow code worked fine for me -

LayoutParams params 
= tabHost.getTabWidget().getChildAt(0).getLayoutParams();
params.width = 170;
params.height = 120;
tabHost.getTabWidget().getChildAt(0).setLayoutParams(params );

On Thursday, May 28, 2009 11:40:26 PM UTC-4, stonestrange wrote:
>
> hi,guys. 
> Because of i add image on the tab,the tab looks small,and the string 
> of the tab is on the image now. 
> So,i want to make the tab looks larger,and the string of the tab could 
> under the image. 
> what should i do?thank you.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: how to set the size of tab in tabHost?

2009-07-09 Thread k7k0

On 29 mayo, 01:00, Android Users  wrote:
> Try this.
>
> tabHost.getTabWidget().getChildAt(0).setLayoutParams(new
> LinearLayout.LayoutParams(width,height));

It works! Thanks a lot. To avoid a new layout:

tabHost.getTabWidget().getChildAt(0).getLayoutParams().height =
35;

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to set the size of tab in tabHost?

2009-05-28 Thread Android Users
Try this.

tabHost.getTabWidget().getChildAt(0).setLayoutParams(new
LinearLayout.LayoutParams(width,height));

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to set the size of tab in tabHost?

2009-05-28 Thread Mark Murphy

> Because of i add image on the tab,the tab looks small,and the string
> of the tab is on the image now.
> So,i want to make the tab looks larger,and the string of the tab could
> under the image.
> what should i do?thank you.

I do not believe you can control the sizes of the tabs.

Your choices are:

1. Live with it as it is.

2. Subclass or reimplement the necessary classes to give you the control
you seek -- you can get the source from http://source.android.com

3. Switch to some other container, like ViewFlipper, and draw your own tabs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---