|
2 | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | android:layout_width="match_parent" |
4 | 4 | android:layout_height="match_parent" |
| 5 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
5 | 6 | android:orientation="vertical" |
6 | | - android:background="#000000" |
| 7 | + android:background="#99000000" |
7 | 8 | android:padding="16dp"> |
8 | 9 |
|
9 | 10 | <EditText |
|
26 | 27 | android:textColor="#FFFFFF" |
27 | 28 | android:text="PLAY"/> |
28 | 29 |
|
29 | | - <Button |
| 30 | + <LinearLayout |
30 | 31 | android:layout_width="match_parent" |
31 | | - android:layout_height="40dp" |
| 32 | + android:layout_height="wrap_content" |
32 | 33 | android:layout_marginTop="10dp" |
33 | | - android:background="@color/colorPrimary" |
34 | | - android:onClick="volumeIncrease" |
35 | | - android:textSize="16sp" |
36 | | - android:textColor="#FFFFFF" |
37 | | - android:text="音量加"/> |
| 34 | + android:orientation="horizontal"> |
| 35 | + <Button |
| 36 | + android:layout_width="0dp" |
| 37 | + android:layout_weight="1" |
| 38 | + android:layout_height="40dp" |
| 39 | + android:background="@color/colorPrimary" |
| 40 | + android:onClick="volumeIncrease" |
| 41 | + android:textSize="16sp" |
| 42 | + android:textColor="#FFFFFF" |
| 43 | + android:text="音量加"/> |
| 44 | + <Button |
| 45 | + android:layout_width="0dp" |
| 46 | + android:layout_weight="1" |
| 47 | + android:layout_height="40dp" |
| 48 | + android:layout_marginLeft="10dp" |
| 49 | + android:background="@color/colorPrimary" |
| 50 | + android:onClick="volumeReduce" |
| 51 | + android:textSize="16sp" |
| 52 | + android:textColor="#FFFFFF" |
| 53 | + android:text="音量减"/> |
| 54 | + </LinearLayout> |
38 | 55 |
|
39 | | - <Button |
40 | | - android:layout_width="match_parent" |
41 | | - android:layout_height="40dp" |
42 | | - android:layout_marginTop="10dp" |
43 | | - android:background="@color/colorPrimary" |
44 | | - android:onClick="volumeReduce" |
| 56 | + <androidx.appcompat.widget.SwitchCompat |
| 57 | + android:id="@+id/music_play_switch_compat" |
| 58 | + android:layout_width="wrap_content" |
| 59 | + android:layout_height="wrap_content" |
45 | 60 | android:textSize="16sp" |
46 | 61 | android:textColor="#FFFFFF" |
47 | | - android:text="音量减"/> |
| 62 | + android:text="单曲循环" |
| 63 | + app:switchPadding="10dp" |
| 64 | + app:showText="true" |
| 65 | + android:textOn="开" |
| 66 | + android:textOff="关" |
| 67 | + android:checked="true" |
| 68 | + android:layout_marginTop="10dp" /> |
48 | 69 |
|
49 | 70 | <SeekBar |
50 | 71 | android:id="@+id/music_seek_bar" |
51 | 72 | android:layout_width="match_parent" |
52 | | - android:layout_height="2dp" |
| 73 | + android:layout_height="4dp" |
53 | 74 | android:layout_marginTop="10dp" |
54 | 75 | android:focusable="false" |
55 | 76 | android:maxHeight="4dp" |
|
0 commit comments