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:
@@ -10,6 +10,7 @@
|
||||
<color name="divider">#cbcbcb</color>
|
||||
<color name="inactive">#c4c4c4</color>
|
||||
<color name="nav_bar">#01fafafa</color>
|
||||
<color name="secondary_text">#546e7a</color>
|
||||
|
||||
<!--
|
||||
Base color set derived from Music Player GO.
|
||||
|
||||
@@ -2,21 +2,16 @@
|
||||
<resources>
|
||||
<!--
|
||||
TODO: Redo these dimens to line up with the 8dp grid. Tiny spacing can be used for
|
||||
internal elements, but micro spacing needs to be phased out. Certain dimens need to
|
||||
be flattened and buttons need to become at least 48x48.
|
||||
- The unbounded buttons can become 48x48 with 8dp of padding to keep icon dimens.
|
||||
If the play icon is replaced then it will also be trivial to do with them as well.
|
||||
internal elements, but micro spacing needs to be phased out.
|
||||
-->
|
||||
|
||||
<!-- Spacing Namespace | Dimens for padding/margin attributes -->
|
||||
<dimen name="spacing_micro">2dp</dimen>
|
||||
<dimen name="spacing_tiny">4dp</dimen>
|
||||
<dimen name="spacing_small">8dp</dimen>
|
||||
<dimen name="spacing_medium">16dp</dimen>
|
||||
<dimen name="spacing_mid_large">24dp</dimen>
|
||||
<dimen name="spacing_large">32dp</dimen>
|
||||
<dimen name="spacing_mid_huge">48dp</dimen>
|
||||
<dimen name="spacing_huge">64dp</dimen>
|
||||
<dimen name="spacing_insane">128dp</dimen>
|
||||
|
||||
<!-- Width Namespace | Width for UI elements -->
|
||||
@@ -24,7 +19,10 @@
|
||||
<dimen name="width_fast_scroll">20dp</dimen>
|
||||
|
||||
<!-- Size Namespace | Width & Heights for UI elements -->
|
||||
<dimen name="size_small_unb_ripple">18dp</dimen>
|
||||
<dimen name="size_btn_small">48dp</dimen>
|
||||
<dimen name="size_btn_large">64dp</dimen>
|
||||
|
||||
<dimen name="size_small_unb_ripple">20dp</dimen>
|
||||
<dimen name="size_unb_ripple">24dp</dimen>
|
||||
|
||||
<dimen name="size_cover_compact">48dp</dimen>
|
||||
@@ -32,15 +30,12 @@
|
||||
<dimen name="size_cover_huge_land">136dp</dimen>
|
||||
<dimen name="size_cover_huge">264dp</dimen>
|
||||
|
||||
<dimen name="size_play_pause">64dp</dimen>
|
||||
<dimen name="size_unbounded">36dp</dimen>
|
||||
<dimen name="size_scroll_thumb">48dp</dimen>
|
||||
<dimen name="size_clear">32dp</dimen>
|
||||
|
||||
<dimen name="size_app_icon">48dp</dimen>
|
||||
<dimen name="size_stroke_small">1dp</dimen>
|
||||
<dimen name="size_stroke_large">2dp</dimen>
|
||||
|
||||
<dimen name="size_app_icon">48dp</dimen>
|
||||
<dimen name="size_scroll_thumb">48dp</dimen>
|
||||
|
||||
<!-- Text Size Namespace | Text Sizes -->
|
||||
<dimen name="text_size_small">16sp</dimen>
|
||||
<dimen name="text_size_medium">18sp</dimen>
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<string name="desc_shuffle">Turn shuffle on or off</string>
|
||||
|
||||
<string name="desc_clear_user_queue">Clear queue</string>
|
||||
<string name="desc_queue_handle">Move queue song</string>
|
||||
<string name="desc_clear_search">Clear search query</string>
|
||||
<string name="desc_blacklist_delete">Remove excluded directory</string>
|
||||
|
||||
@@ -130,6 +131,7 @@
|
||||
<string name="desc_artist_image">Artist Image for %s</string>
|
||||
<string name="desc_genre_image">Genre Image for %s</string>
|
||||
|
||||
|
||||
<!-- Default Namespace | Placeholder values -->
|
||||
<string name="def_genre">Unknown Genre</string>
|
||||
<string name="def_artist">Unknown Artist</string>
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<!-- COMPONENT-SPECIFIC STYLES. NOT RE-USABLE. -->
|
||||
|
||||
<style name="Widget.Component.Playback.PlayPause" parent="">
|
||||
<item name="android:layout_height">@dimen/size_play_pause</item>
|
||||
<item name="android:layout_width">@dimen/size_play_pause</item>
|
||||
<item name="android:layout_height">@dimen/size_btn_large</item>
|
||||
<item name="android:layout_width">@dimen/size_btn_large</item>
|
||||
<item name="android:background">@drawable/ui_circle_ripple</item>
|
||||
<item name="android:backgroundTint">?attr/colorAccent</item>
|
||||
<item name="android:elevation">@dimen/elevation_normal</item>
|
||||
<item name="android:contentDescription">@string/desc_play_pause</item>
|
||||
<item name="android:tint">?android:attr/windowBackground</item>
|
||||
<item name="android:tint">?attr/colorSurface</item>
|
||||
<item name="android:src">@drawable/ic_playing_state</item>
|
||||
<item name="android:layout_marginStart">@dimen/spacing_large</item>
|
||||
<item name="android:layout_marginTop">@dimen/spacing_medium</item>
|
||||
<item name="android:layout_marginEnd">@dimen/spacing_large</item>
|
||||
@@ -48,11 +48,11 @@
|
||||
</style>
|
||||
|
||||
<style name="Widget.Component.AppWidget.Button.Base" parent="Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:layout_height">@dimen/size_unbounded</item>
|
||||
<item name="android:layout_height">@dimen/size_btn_small</item>
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
<item name="android:padding">@dimen/spacing_tiny</item>
|
||||
<item name="android:padding">@dimen/spacing_small</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Component.AppWidget.Button" parent="Widget.Component.AppWidget.Button.Base">
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
<!-- Appearance -->
|
||||
<item name="android:windowBackground">?attr/colorSurface</item>
|
||||
<item name="android:colorBackground">?attr/colorSurface</item>
|
||||
<item name="android:textColorSecondary">@color/secondary_text</item>
|
||||
<item name="android:fontFamily">@font/inter</item>
|
||||
<item name="android:textCursorDrawable">@drawable/ui_cursor</item>
|
||||
|
||||
<item name="cornerRadius">0dp</item>
|
||||
|
||||
<!-- System-specific magic -->
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</style>
|
||||
|
||||
<!-- TEXTVIEW STYLES -->
|
||||
<style name="ItemText" parent="Widget.AppCompat.TextView">
|
||||
<style name="Widget.TextView.Item.Base" parent="Widget.AppCompat.TextView">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textAlignment">viewStart</item>
|
||||
@@ -87,12 +87,12 @@
|
||||
<item name="android:layout_marginStart">@dimen/spacing_medium</item>
|
||||
</style>
|
||||
|
||||
<style name="ItemText.Primary" parent="ItemText">
|
||||
<style name="Widget.TextView.Item.Primary" parent="Widget.TextView.Item.Base">
|
||||
<item name="android:textAppearance">?android:attr/textAppearanceListItem</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="ItemText.Secondary" parent="ItemText">
|
||||
<style name="Widget.TextView.Item.Secondary" parent="Widget.TextView.Item.Base">
|
||||
<item name="android:textAppearance">?android:attr/textAppearanceListItemSecondary</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
@@ -141,7 +141,9 @@
|
||||
<item name="android:paddingTop">@dimen/spacing_small</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_small</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_medium</item>
|
||||
<item name="android:minHeight">@dimen/size_btn_small</item>
|
||||
<item name="android:textSize">@dimen/text_size_medium</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
<item name="android:fontFamily">@font/inter_semibold</item>
|
||||
<item name="android:background">@drawable/ui_header_dividers</item>
|
||||
@@ -175,16 +177,16 @@
|
||||
<!-- BUTTON STYLES -->
|
||||
|
||||
<style name="Widget.Button.Unbounded" parent="Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:layout_width">@dimen/size_unbounded</item>
|
||||
<item name="android:layout_height">@dimen/size_unbounded</item>
|
||||
<item name="android:layout_width">@dimen/size_btn_small</item>
|
||||
<item name="android:layout_height">@dimen/size_btn_small</item>
|
||||
<item name="android:background">@drawable/ui_unbounded_ripple</item>
|
||||
<item name="android:scaleType">fitCenter</item>
|
||||
<item name="android:padding">@dimen/spacing_micro</item>
|
||||
<item name="android:padding">@dimen/spacing_small</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Button.Unbounded.Small" parent="Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:minWidth">0dp</item>
|
||||
<item name="android:minHeight">0dp</item>
|
||||
<item name="android:minWidth">@dimen/size_btn_small</item>
|
||||
<item name="android:minHeight">@dimen/size_btn_small</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_medium</item>
|
||||
<item name="android:paddingTop">@dimen/spacing_small</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_small</item>
|
||||
|
||||
Reference in New Issue
Block a user