Set Height of separator between Tab widget and FrameLayout
I'm using TabHost in my app and i want to increase the thickness of the strip between tab widget and framelayout.
<TabHost android:layout_width="fill_开发者_运维技巧parent"
android:layout_height="fill_parent"
android:id="@android:id/tabhost">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TabWidget android:id="@android:id/tabs"
android:layout_height="wrap_content" android:layout_width="fill_parent">
</TabWidget>
<FrameLayout android:id="@android:id/tabcontent"
android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="#FF0000">
<LinearLayout android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="wrap_content">
<TextView android:text="TravelApplication1" android:layout_height="70dip" android:layout_width="fill_parent"></TextView>
<TextView android:text="TravelApplication2" android:layout_height="70dip" android:layout_width="fill_parent"></TextView>
<TextView android:text="TravelApplication3" android:layout_height="70dip" android:layout_width="fill_parent"></TextView>
<TextView android:text="TravelApplication4" android:layout_height="70dip" android:layout_width="fill_parent"></TextView>
</LinearLayout>
</FrameLayout>
</LinearLayout>
Kindly suggest me to increse the thickness between tabWidget and FrameLayout.
Regards Deepak Goel
Add margin property to your FrameLayout element will increase space between Tab widget and FrameLayout :
<TabWidget android:id="@android:id/tabs"
android:layout_height="wrap_content" android:layout_width="fill_parent">
</TabWidget>
<FrameLayout android:id="@android:id/tabcontent" android:layout_marginTop="10dip"
android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="#FF0000">
.......
</FrameLayout>
</LinearLayout>
EDIT: The line in tab widget is default, you have to make a custom tab widget by a layout if you want to custom it.
Have you tried using android:paddingTop/paddingBottom on the tab widget or frame layouts?
精彩评论