<?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?android
<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?android
解决方案 »
- android怎么实现 图像随着手指的移动而移动
- android 通过底层控制apk安装
- 关于android手机显示显示多字段表格数据的问题
- m_message是QPushButton
- 每天启动用户五百,放google广告每天可以挣多少钱呢?
- 新建 android程序,运行无反应
- Android 如何设置 Setting 中的默认选项
- 安卓Logcat出现GC_CONCURRENT
- 微信实时语音聊天的实现原理?哪位大牛能给个实现思路
- 推荐一份Android APP毕业论文
- 怎样将一个wav文件 打包进 dpk 文件里? 还有要程序怎样访问这个打包的wav文件?
- 求一个基于awesomeplayer的开源视频播放器应用!!
如果你想说的是layout_weight,布局的时候就是靠这个weight才能把TabWidget顶到下面去。