TableHost_用法
来源:互联网 发布:旋转后的成分矩阵 编辑:程序博客网 时间:2024/05/16 13:38
语句解释:
|- 在构建TabHost控件时,最少要使用如下三个标签:
|- <TabHost>标签:描述TabHost控件本身。
|- <TabWidget>标签:描述选项卡集合。
|- <FrameLayout>标签:描述帧布局。
|- TabHost控件要求:
|- 其内的TabWidget和FrameLayout的id属性必须为:
|- @android:id/tabs和@android:id/tabcontent。
|- 因为在用户操作TabHost时, TabHost内部需要根据用户点击的“选项卡”来控制TabWidget的当前状态以及FrameLayout所需要显示的内容。
<TabHost
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/tabhost">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- 将选项卡集合放到最底部 -->
<TabWidget
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:id="@android:id/tabs"/>
<!-- 将帧布局放到选项卡的上部-->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="60dp"
android:id="@android:id/tabcontent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="个人信息"
android:id="@+id/a"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="系统"
android:id="@+id/b"/>
</FrameLayout>
</RelativeLayout>
</TabHost>
- TableHost_用法
- 用法
- ,, 用法
- 用法
- 用法
- #用法
- ??用法
- !!用法
- CustDialog用法 SimpleAdapter 用法
- hibernate_Restrictions用法 hibernate_Restrictions用法
- extern用法+assert用法
- getParameterValues用法
- rpm用法
- Log4j用法
- NameSpace用法
- sp_executesql 用法
- ShellExecute用法
- getParameterValues用法
- SharePoint中修改密码的WEB Part之终极版:即可以修改AD,又可以修改本机用户密码的Web Part!!
- 昌盛的中国IT发展
- 《JAVA与模式》之观察者模式
- NS2之移动节点能量模型
- POJ 1656 二维树状数组简单应用
- TableHost_用法
- 微信公众平台开发(七) 聊天机器人功能开发
- NS2节点通信半径修改
- struts2的工作机制
- Uest 1421 Adjacent Bit Counts dp
- php-微信公众平台开发(八) 自定义菜单功能开发
- Codeforces Round 232 Div 1 C On Changing Tree 树状数组 或 线段树
- 算法基础(三):队列基础
- eclipse中添加Java代码注释模板