原始布局文件:
<android.support.v4.app.FragmentTabHost xmlns:android="http://schemas.android.com/apk/res/android"  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_height="wrap_content" />      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" />      <FrameLayout        android:id="@+id/realtabcontent"        android:layout_width="match_parent"        android:layout_height="match_parent" />      <FrameLayout        android:id="@+id/realtabcontent"        android:layout_width="match_parent"        android:layout_height="match_parent" /></android.support.v4.app.FragmentTabHost>
解决方法,更改后布局文件
<android.support.v4.app.FragmentTabHost 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:layout_width="fill_parent"        android:layout_height="fill_parent"        android:orientation="vertical" >        <TabWidget            android:id="@android:id/tabs"            android:layout_width="fill_parent"            android:layout_height="wrap_content" />        <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" />            <FrameLayout                android:id="@+id/realtabcontent"                android:layout_width="match_parent"                android:layout_height="match_parent" />            <FrameLayout                android:id="@+id/realtabcontent"                android:layout_width="match_parent"                android:layout_height="match_parent" />        </RelativeLayout>    </LinearLayout></android.support.v4.app.FragmentTabHost>

更多相关文章

  1. android 常用的代码
  2. Android分享文件到微信和QQ功能的实现(兼容android 7.0以上的共享
  3. Android热修复之AndFix
  4. 系统总结归纳一下android
  5. app在android studio的构建过程
  6. android的文件操作
  7. 分享几点Android(安卓)开发中的小技巧吧。不知道算不算?
  8. 浅谈android中的反编译
  9. NPM 和webpack 的基础使用

随机推荐

  1. Android(安卓)AOP 之 javassist 示例
  2. Android Studio中SVN安装与使用
  3. Android搭建开发环境
  4. Android逆向工程初步(一) 15.4.24
  5. android textview设置字体的行距和字间距
  6. Android TextInputLayout 使用及其属性
  7. Android Studio中的六种依赖
  8. 如何让你的手机屏幕固定横屏和竖屏
  9. Android 中文API (92) —— MenuInflater
  10. 腾讯微博java(android) sdk 标签相关api