在TabHost Android中更改视图 [英] Changing the view in TabHost in Android
本文介绍了在TabHost Android中更改视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能改变TabHost在android系统,所以它应该是一样的UITabBarController在iPhone?即视图应该是对TabHost的顶部,而不是在底部。
How Can i change the TabHost in android, so it should look same as UITabBarController in iPhone? ie view should be on the top of the TabHost,not at the bottom.
推荐答案
下面是一个示例布局code会对屏幕底部的标签:
Here's a sample layout code to have the tabs on the bottom of the screen:
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_weight="1">
</FrameLayout>
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent" android:layout_height="65dp"
android:layout_marginLeft="0dip" android:layout_marginRight="0dip"
android:layout_weight="0"></TabWidget>
</LinearLayout>
</TabHost>
这篇关于在TabHost Android中更改视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文