android常见的视觉效果,通过点击下方的Tab实现页面切换效果,用到的即是TabHost的子类之一:FragmentTabHost,他的好处即在于可以方便的编写具体页面内容,实现步骤如下:
1、主页面布局 —— activity_main.xml
<LinearLayout 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"
android:orientation="vertical"
tools:context="com.example.android_myewj.MainActivity" >
<FrameLayout
android:id="@+id/realtabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"/>
<android.support.v4.app.FragmentTabHost
android:i