文章目录
音乐播放器4.0布局
目标:这一节里,我们需要完成以下以下效果
activity_main
布局中放置 RadioGroup 和 ViewPager
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#2894FF"
android:gravity="center"
android:text="音乐播放器"
android:textColor="#fff" />
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioButtonNew"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight