标签:
activity_main.xml 结构如下:
<?xml version="1.0" encoding="utf-8"?>
<!-- 采用线性布局,垂直平铺 -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<!-- 选项卡对应的容器 内容 -->
<FrameLayout
android:id="@+id/mainfrmcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<!-- 选项卡 -->
<android.support.v4.app.FragmentTabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_tabhost_bg">
</android.support.v4.app.FragmentTabHost>
</LinearLayout>
MainActivity.java 代码
淘宝(阿里巴巴)手机客户端开发日记第一篇 android 主框架搭建(三)
标签:
原文地址:http://www.cnblogs.com/yushengbo/p/4602657.html