一、顶部选项卡
1.方法:(1)在res的layout文件目录下新建.xml的布局文件,并取名为:main_tab.xml(自己喜好,随意发挥)。
(2)在src文件夹里的包下创建Java类,名为TabHostActivity(自己喜好,随意发挥)。
2.布局文件代码:
<?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"
android:background="#000066" >
<LinearLayout
android:id="@+id/tabll"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TabWidget
android:id