(一)实现步骤:
1.界面布局(activity_main)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical"
android:background="#D3D3D3"
tools:ignore="ResourceName">
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/tab_bar"/>
<RadioGroup
android:id="@+id/tab_bar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:orientation="horizontal"
android:layout_alignParentBottom="true">
<RadioButton
android:id="@+id/tab_home"
android:gravity="center"
android:button="@n