RadioGroup实现底部导航栏效果,如图::

实现可最基本的导航栏功能,不能左右滑动,只能点击
1.内嵌的fragment的布局:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:textSize="50sp" android:textColor="@color/colorPrimary" android:text="home"/> </LinearLayout>