style: fix accessibility issues
Fix a plethora of style issues that lead to a worse touch experience. I tried to optimize these solutions so that they didn't reduce the layout density too much. More updates may have to be made in the future.
This commit is contained in:
@@ -68,16 +68,16 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_song"
|
||||
tools:text="Artist Name / Album Name" />
|
||||
|
||||
<org.oxycblt.auxio.playback.PlayPauseButton
|
||||
<ImageButton
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/Widget.Button.Unbounded"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_playing_state"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_pause" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -140,15 +140,16 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_loop"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.playback.PlayPauseButton
|
||||
<ImageButton
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/Widget.Component.Playback.PlayPause"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_duration_current"
|
||||
tools:src="@drawable/ic_pause" />
|
||||
tools:src="@drawable/ic_play" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playback_skip_next"
|
||||
@@ -168,6 +169,7 @@
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"
|
||||
android:src="@drawable/ic_shuffle"
|
||||
app:tint="@color/color_accent_active"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next" />
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_check"
|
||||
tools:backgroundTint="?attr/colorAccent"
|
||||
tools:ignore="contentDescription" />
|
||||
tools:ignore="ContentDescription, SpeakableTextPresentCheck" />
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@@ -34,7 +34,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/header_title"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_clear" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:text="@{album.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/album_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_info"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
app:albumInfo="@{album}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:text="@{song.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_duration"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_duration"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
android:text="@{song.formattedDuration}"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:text="@{artist.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/artist_details"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_details"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
app:artistCounts="@{artist}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:text="@{album.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/album_year"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_year"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
app:albumYear="@{album}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@{song.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_info"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@{song.album.name}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_duration"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
android:ellipsize="none"
|
||||
android:gravity="end"
|
||||
android:text="@{song.formattedDuration}"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excluded_path"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:maxLines="@null"
|
||||
@@ -23,11 +23,9 @@
|
||||
<ImageButton
|
||||
android:id="@+id/excluded_clear"
|
||||
style="@style/Widget.Button.Unbounded"
|
||||
android:layout_width="@dimen/size_clear"
|
||||
android:layout_height="@dimen/size_clear"
|
||||
android:contentDescription="@string/desc_blacklist_delete"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:text="@{genre.resolvedName}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/genre_count"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_count"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
android:text="@{@plurals/fmt_song_count(genre.songs.size(), genre.songs.size())}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@{song.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_info"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_duration"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
android:ellipsize="none"
|
||||
android:gravity="end"
|
||||
android:text="@{song.formattedDuration}"
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/spacing_medium">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album_cover"
|
||||
style="@style/Widget.ImageView.Compact"
|
||||
android:contentDescription="@{@string/desc_album_cover(song.name)}"
|
||||
app:albumArt="@{song}"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@{song.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
||||
@@ -40,8 +40,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_info"
|
||||
style="@style/ItemText.Secondary"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -52,16 +51,17 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/song_drag_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="@dimen/size_btn_small"
|
||||
android:layout_height="@dimen/size_btn_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/desc_queue_handle"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/spacing_tiny"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_handle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/song_info"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/album_cover"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/song_name"
|
||||
tools:ignore="ContentDescription" />
|
||||
app:layout_constraintTop_toTopOf="@+id/song_name" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
style="@style/ItemText.Primary"
|
||||
style="@style/Widget.TextView.Item.Primary"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@{song.name}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_info"
|
||||
style="@style/ItemText.Secondary"
|
||||
style="@style/Widget.TextView.Item.Secondary"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
android:id="@+id/widget_play_pause"
|
||||
style="@style/Widget.Component.AppWidget.Button"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_play" />
|
||||
android:src="@drawable/ic_playing_state" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/widget_skip_next"
|
||||
|
||||
Reference in New Issue
Block a user