2011-04-20 66 views
0

你好朋友我在我的代码中实现TAbHost,并且我想在任何小部件(按钮,TextView等等)下面选项卡,但是我不这么做。 Plz帮助我。Android中的TabHost

将显示在顶部小部件和低于小部件选项卡的Xml中的方法。

+0

我发现我的Andswer ..... Thankx的建议 – AndroidDanger 2011-05-07 08:23:23

回答

1

你想把标签放在顶部或制表符底部的布局?我无法理解。

如果你的意思是在上面我建议你做Google Tab Layout Tutorial

我希望帮助

0
<?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>