android 中怎样能让tabhost竖起来啊比如:table1table2table3----------------------------------要改成:ta
android 中怎样能让tabhost竖起来啊
比如:
table1 table2 table3
----------------------------------
要改成:
table1 |
|
table2 |
|
table3 |
|
|
|
[解决办法]
在TabActivity派生类的onPostCreate里面把content view改成自己的,本来是这样的布局:
- XML code
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TabWidget android:id="@android:id/tabs" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="0"/> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1"/> </LinearLayout></TabHost>
