activity_main.xml页面放置TabHost控件,用于标题的选择。
2016-06-15 12:59
483 查看
activity_main.xml页面放置TabHost控件,用于标题的选择。
activity_main.xml页面
:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:id="@+id/tab1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/tab2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/tab3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
</FrameLayout>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</TabWidget>
</LinearLayout>
</TabHost>
</RelativeLayout>
activity_main.xml页面
:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:id="@+id/tab1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/tab2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/tab3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
</FrameLayout>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</TabWidget>
</LinearLayout>
</TabHost>
</RelativeLayout>
相关文章推荐
- leetcode——Container With Most Water
- LeetCode:Factorial Trailing Zeroes
- [Training Video - 1] [Selenium Basics] [Xpath Selenium]
- Cookie跨域setDomain和setPath
- Annotation之标记注解
- CDISC SDTM AE domain学习笔记 - 2
- Kodi ——7 Filling containers
- mongoDB Cannot start server. The default storage engine 'wiredTiger' is not available
- 理解 OpenStack + Ceph (9): Ceph 的size/min_size/choose/chooseleaf/scrubbing/repair 等概念
- Kodi ——6 Controls (26)6.26 Panel Container
- Kodi ——6 Controls (25)6.25 FixedList Container
- xcode换新版本,原来工程编译报错:linker command failed with exit code 1(use -v to see invocation)
- Kodi ——6 Controls (24)6.24 Wraplist Container
- Kodi ——6 Controls (23)6.23 List Container
- 在AIX8.0下实现ftp上传指定文件到ftp服务器
- List的contains()方法
- 李开复万字长文科普人工智能:AI是什么 将带我们去哪儿?
- 北美18名校的数据挖掘,数据分析,人工智能及机器学习课程汇总
- 北美18名校的数据挖掘,数据分析,人工智能及机器学习课程汇总
- 人工智能、机器学习和数据挖掘三者之间的关系