Something I just noticed. If I don't have a picture and I just have text if I set the height of the tab to say 45dp it cuts off the text. I tried to add gravity="top" but that didn't do anything. Is there a way to move the text up so it won't get cut off or should I create an Image that contains the text I want to show so it fits in the tab?
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of akkilis Sent: Friday, December 03, 2010 12:53 PM To: Android Developers Subject: [android-developers] Re: TabHost Layout Question You can set the height of the "Tabs" of your TabHost or simply can provide the images to them also to change their background. Setting Height: <TabHost android:id="@+id/tab_host" -------- <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="10px"/> (Setting the height here) <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:id="@+id/content1" <!-- Layout of Tab 1 --> </LinearLayout> <LinearLayout android:id="@+id/content2" </LinearLayout> Setting Image: View v = tabWidget.getChildAt(i); v.setBackgroundDrawable(getResources().getDrawable( R.drawable.tab_image_selector_recent)); On Dec 3, 9:52 pm, Tommy <[email protected]> wrote: > Hi everyone, > > I was wondering if it is possible to set a height for the individual > tabs on the widgets or if I am stuck using the default heights. > > Thanks for your time, > > Tommy -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] 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 post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

