当前位置: 代码迷 >> Android >> tabHost中将选项卡放在底部?该怎么解决
  详细解决方案

tabHost中将选项卡放在底部?该怎么解决

热度:87   发布时间:2016-05-01 11:19:32.0
tabHost中将选项卡放在底部?
<?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"  
  
    >  
  
        <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="0dip"  
  
                        android:layout_weight="1"  
  
                        />  
  
                <TabWidget  
  
                        android:id="@android:id/tabs"  
  
                        android:layout_width="fill_parent"  
  
                        android:layout_height="wrap_content"  
  
                        android:layout_weight="0"  
  
                        android:background="#ff000000"  
  
                        />  
  
        </LinearLayout>  
  
</TabHost>
在网上看了好几种,感觉这种还行,但是有几个不懂得,为什么在framelayout和tabwidget中要重复定义layout_width?