2011-03-31 51 views
1

您好我想放置的标签控件中我使用下面的代码在屏幕的底部放置标签。随着它显示在顶部可以在任何一个知道soution在底部

<FrameLayout 
     android:id="@android:id/tabcontent" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:padding="5dp" 
     android:layout_weight="1" android:gravity="bottom"/> 
    <HorizontalScrollView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" android:gravity="bottom"> 
    <TabWidget 
     android:id="@android:id/tabs" 
     android:gravity="bottom" 
     android:layout_width="500dp" 
     android:layout_height="wrap_content" 
     android:layout_weight="0" 
     android:scrollbars="horizontal" 

     /> 
     </HorizontalScrollView> 

+0

阅读完整的帖子与此相关:http://stackoverflow.com/questions/2395661/android-tabs-at-the-bottom – 2011-03-31 06:53:20

+0

尝试滚动TabHost .. http://code.google.com/p/mobyfactory- uiwidgets-android/....这就是你需要我想.. – 2011-03-31 06:59:33

回答

0

试试这个....

<RelativeLayout android:id="@+id/LinearLayout02" 
       android:orientation="vertical" android:layout_width="fill_parent" 
       android:layout_height="fill_parent">  
    <TabHost android:id="@android:id/tabhost" 
     android:layout_width="fill_parent" android:layout_height="fill_parent"> 


     <TabWidget android:id="@android:id/tabs" 
      android:layout_width="fill_parent" android:layout_gravity="bottom" android:layout_height="wrap_content" /> 
     <FrameLayout android:id="@android:id/tabcontent" 
      android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="80dip" 
      > 
      <LinearLayout android:id="@+id/LinearLayout01" 
       android:orientation="vertical" android:layout_width="fill_parent" 
       android:layout_height="fill_parent" android:background="#E0FFFF"> 
      </LinearLayout> 
     </FrameLayout> 

    </TabHost> 
    </RelativeLayout> 
+0

我已经尝试过,但它显示顶部的标签。我需要它在底部 – rakeshmenon 2011-03-31 07:14:32

+0

添加此代码在framelayout .. – 2011-03-31 07:16:20