Android中的TabHost
问题描述:
你好朋友我在我的代码中实现TAbHost,并且我想在任何小部件(按钮,TextView等等)下面选项卡,但是我不这么做。 Plz帮助我。Android中的TabHost
将显示在顶部小部件和低于小部件选项卡的Xml中的方法。
答
<?xml version="1.0" encoding="utf-8"?><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">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_above="@android:id/tabs" />
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
我发现我的Andswer ..... Thankx的建议 – AndroidDanger 2011-05-07 08:23:23