方法一:

<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="match_parent"         android:layout_weight="1" >          </FrameLayout>         <TabWidget android:id="@android:id/tabs"         android:layout_width="fill_parent"          android:layout_height="wrap_content" />       </LinearLayout>   </TabHost> 

1、tabcontent和tabs交换位置
2、tabcontent的android:layout_weight="1"

方法二:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent">     <TabHost         android:id="@+id/tabhost"         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:paddingBottom="62px">         </FrameLayout>         <RelativeLayout             android:layout_width="fill_parent"             android:layout_height="fill_parent">             <TabWidget                 android:id="@android:id/tabs"                 android:layout_alignParentBottom="true"                 android:layout_width="fill_parent"                 android:layout_height="60px" />         </RelativeLayout>     </TabHost> </LinearLayout> 

1、tabcontent和tabs交换位置
2、将tabcontent放到一个relativeLayout中,然后加上这句android:layout_alignParentBottom="true"

更多相关文章

  1. Android学习笔记(九):Activity-RelativeLayout
  2. Activity-RelativeLayout
  3. android:gravity / android:layout_Gravity,android:padding / an
  4. android SearchView + ListView过滤
  5. Android学习笔记(九):Activity-RelativeLayout
  6. Android技能树 — Fragment总体小结
  7. Android:相对位置排版
  8. widgets
  9. Android(安卓)23种设计模式

随机推荐

  1. Node.js on Android
  2. 常用编程语言中英文API汇总
  3. 音量控制和音频播放
  4. how to use linux nfs in android
  5. 整理了下viewpagerTransformers框架的效
  6. 如何打Android的补丁包------how to patc
  7. android代码实现自动关机(非root也可以)
  8. Android截取视频帧并转化为Bitmap
  9. Unable to locate Android(安卓)SDK used
  10. Android查询通话记录