先来效果图哈哈
图一:
![在这里插入图片描述](https://img-blog.csdn.net/20181009163516801?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MjMwNjcwNw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)
图二:![在这里插入图片描述](https://img-blog.csdn.net/20181009163551156?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MjMwNjcwNw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)
1.首先搭建MainActivity的界面 名为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="${relativePackage}.${activityClass}" >
//ViewPager需要提前导入design包
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="10">
</android.support.v4.view.ViewPager>
<RadioGroup
android:id="@+id/group"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal" >
<RadioButton
android:id="@+id/one"
android:layout_width="0dp"
android:layout_height="match_parent"
Android 仿微信界面 使用RadioGroup+ViewPager实现底部按钮切换以及滑动
最新推荐文章于 2021-05-26 04:16:21 发布