android selector 背景選擇器的使用, button (未點選,點選,選中保持狀態)效果實現
阿新 • • 發佈:2019-02-05
<ImageButton
android:layout_marginRight="15dp"
android:background="@null"
android:id="@+id/stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/music_stop_style" />
<ImageButton
android:id="@+id/play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginRight="15dp"
android:layout_marginLeft="15dp"
android:src="@drawable/music_play_style" />
<ImageButton
android:layout_marginLeft="15dp"
android:id="@+id/pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:src="@drawable/music_pause_style " />
android:layout_marginRight="15dp"
android:background="@null"
android:id="@+id/stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/music_stop_style" />
<ImageButton
android:id="@+id/play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:layout_marginRight="15dp"
android:layout_marginLeft="15dp"
android:src="@drawable/music_play_style"
<ImageButton
android:layout_marginLeft="15dp"
android:id="@+id/pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:src="@drawable/music_pause_style