playback: rework playback icon visibility
Add a circular indicator to playback icons. Sometimes it can be too difficult to tell apart the active and inactive states of the shuffle/loop icons. However, there is really no good way to improve the contrast on these icons without some kind of muddled UX fragmentation, or god-awful design. Try to settle on the okay-est version, which is to use colorPrimary with a dot indicator on views we control, and use a more muddled semi-transparent icon on views we don't control, like notifications and widgets.
This commit is contained in:
@@ -99,22 +99,21 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
<org.oxycblt.auxio.playback.PlaybackButton
|
||||
android:id="@+id/playback_loop"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_change_loop"
|
||||
android:onClick="@{() -> playbackModel.incrementLoopStatus()}"
|
||||
android:src="@drawable/ic_loop"
|
||||
app:hasIndicator="true"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_prev" />
|
||||
|
||||
<ImageButton
|
||||
<org.oxycblt.auxio.playback.PlaybackButton
|
||||
android:id="@+id/playback_skip_prev"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
@@ -139,11 +138,12 @@
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_seek_bar"
|
||||
tools:src="@drawable/ic_play" />
|
||||
|
||||
<ImageButton
|
||||
<org.oxycblt.auxio.playback.PlaybackButton
|
||||
android:id="@+id/playback_skip_next"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:onClick="@{() -> playbackModel.skipNext()}"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
@@ -152,15 +152,17 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<ImageButton
|
||||
<org.oxycblt.auxio.playback.PlaybackButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"
|
||||
android:src="@drawable/ic_shuffle"
|
||||
app:hasIndicator="true"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_small_unbounded_ripple"
|
||||
android:contentDescription="@{context.getString(header.desc)}"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:src="@{context.getDrawable(header.icon)}"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_song"
|
||||
tools:text="Artist Name / Album Name" />
|
||||
|
||||
<ImageButton
|
||||
<org.oxycblt.auxio.playback.PlaybackButton
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ui_widget_aspect_ratio"
|
||||
android:src="@drawable/ui_remote_aspect_ratio"
|
||||
android:visibility="invisible"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_loop"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_prev"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_next"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_shuffle"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ui_widget_aspect_ratio"
|
||||
android:src="@drawable/ui_remote_aspect_ratio"
|
||||
android:visibility="invisible"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_prev"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_next"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
android:layout_marginBottom="@dimen/spacing_small"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ui_widget_aspect_ratio"
|
||||
android:src="@drawable/ui_remote_aspect_ratio"
|
||||
android:visibility="invisible"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_prev"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_next"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
android:layout_marginBottom="@dimen/spacing_small"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ui_widget_aspect_ratio"
|
||||
android:src="@drawable/ui_remote_aspect_ratio"
|
||||
android:visibility="invisible"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_loop"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_prev"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_skip_next"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
<android.widget.ImageButton
|
||||
android:id="@+id/widget_shuffle"
|
||||
style="@style/Widget.Auxio.Button.AppWidget"
|
||||
style="@style/Widget.Auxio.PlaybackButton.AppWidget"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
Reference in New Issue
Block a user