style: improve layout heirarchy

Further improve the layout heirarchy, shrinking some items so that
the layout is more compact and scrollable.
This commit is contained in:
OxygenCobalt
2021-08-19 17:40:16 -06:00
parent 1f9d23863f
commit 21a24f2496
13 changed files with 40 additions and 43 deletions
@@ -10,7 +10,7 @@
android:paddingTop="@dimen/spacing_small">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/blacklist_recycler"
android:id="@+id/excluded_recycler"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
@@ -18,10 +18,10 @@
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="1"
tools:listitem="@layout/item_blacklist_entry" />
tools:listitem="@layout/item_excluded_dir" />
<TextView
android:id="@+id/blacklist_empty_text"
android:id="@+id/excluded_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/inter_semibold"
@@ -15,7 +15,7 @@
<ImageView
android:id="@+id/album_cover"
style="@style/Widget.ImageView.Large"
style="@style/Widget.ImageView.Normal"
android:contentDescription="@{@string/desc_album_cover(album.name)}"
app:albumArt="@{album}"
app:layout_constraintBottom_toBottomOf="parent"
@@ -9,19 +9,19 @@
android:focusable="false">
<TextView
android:id="@+id/blacklist_title"
android:id="@+id/excluded_path"
style="@style/ItemText.Primary"
android:layout_marginStart="0dp"
android:layout_marginEnd="@dimen/spacing_medium"
android:maxLines="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/blacklist_clear"
app:layout_constraintEnd_toStartOf="@+id/excluded_clear"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="/storage/emulated/0/directory" />
<ImageButton
android:id="@+id/blacklist_clear"
android:id="@+id/excluded_clear"
style="@style/Widget.Button.Unbounded"
android:layout_width="@dimen/size_clear"
android:layout_height="@dimen/size_clear"
+2 -2
View File
@@ -89,8 +89,8 @@
<string name="set_content">Content</string>
<string name="set_save">Wiedergabezustand abspeichern</string>
<string name="set_save_desc">Der aktuell Wiedergabezustand jetzt abspeichern</string>
<string name="set_blacklist">Ausgeschlossene Ordner</string>
<string name="set_blacklist_desc">Die Inhalte der ausgeschlossene Ordner sind versteckt von deiner Musikbibliothek</string>
<string name="set_excluded">Ausgeschlossene Ordner</string>
<string name="set_excluded_desc">Die Inhalte der ausgeschlossene Ordner sind versteckt von deiner Musikbibliothek</string>
<!-- Error Namespace | Error Labels -->
<string name="err_no_music">Keine Musik gefunden</string>
+2 -2
View File
@@ -92,8 +92,8 @@
<string name="set_content">Contenido</string>
<string name="set_save">Guardar estado de reproducción</string>
<string name="set_save_desc">Guardar el estado actual de la reproducción ahora</string>
<string name="set_blacklist">Carpetas excluidas</string>
<string name="set_blacklist_desc">El contenido de las carpetas excluidas se oculta de la biblioteca</string>
<string name="set_excluded">Carpetas excluidas</string>
<string name="set_excluded_desc">El contenido de las carpetas excluidas se oculta de la biblioteca</string>
<!-- Error Namespace | Error Labels -->
<string name="err_no_music">No se encontró música</string>
+2 -2
View File
@@ -90,8 +90,8 @@
<string name="set_content">Inhoud</string>
<string name="set_save">Afspeelstatus opslaan</string>
<string name="set_save_desc">Sla de huidige afspeelstatus nu op </string>
<string name="set_blacklist">Uitgesloten mappen </string>
<string name="set_blacklist_desc">De inhoud van uitgesloten mappen wordt verborgen voor uw bibliotheek</string>
<string name="set_excluded">Uitgesloten mappen </string>
<string name="set_excluded_desc">De inhoud van uitgesloten mappen wordt verborgen voor uw bibliotheek</string>
<!-- Error Namespace | Error Labels -->
<string name="err_no_music">Geen muziek aangetroffen</string>
+8 -7
View File
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- TODO: Rejig these dimens to line up with the 8dp grid. -->
<!--
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
-->
<!-- Spacing Namespace | Dimens for padding/margin attributes -->
<dimen name="spacing_micro">2dp</dimen>
@@ -13,9 +17,6 @@
<dimen name="spacing_huge">64dp</dimen>
<dimen name="spacing_insane">128dp</dimen>
<!-- Height Namespace | Height for UI elements -->
<dimen name="height_widget_button">32dp</dimen>
<!-- Width Namespace | Width for UI elements -->
<dimen name="width_track_number">32dp</dimen>
<dimen name="width_fast_scroll">20dp</dimen>
@@ -26,12 +27,11 @@
<dimen name="size_cover_compact">48dp</dimen>
<dimen name="size_cover_normal">56dp</dimen>
<dimen name="size_cover_large">64dp</dimen>
<dimen name="size_cover_huge_land">128dp</dimen>
<dimen name="size_cover_huge">264dp</dimen>
<dimen name="size_cover_huge_land">136dp</dimen>
<dimen name="size_play_pause">72dp</dimen>
<dimen name="size_play_pause_compact">36dp</dimen>
<dimen name="size_unbounded">36dp</dimen>
<dimen name="size_scroll_thumb">48dp</dimen>
<dimen name="size_clear">32dp</dimen>
@@ -48,5 +48,6 @@
<!-- Misc -->
<dimen name="elevation_small">2dp</dimen>
<dimen name="elevation_normal">4dp</dimen>
<dimen name="offset_thumb">4dp</dimen>
</resources>
+2 -2
View File
@@ -97,8 +97,8 @@
<string name="set_content">Content</string>
<string name="set_save">Save playback state</string>
<string name="set_save_desc">Save the current playback state now</string>
<string name="set_blacklist">Excluded Folders</string>
<string name="set_blacklist_desc">The content of excluded folders is hidden from your library</string>
<string name="set_excluded">Excluded Folders</string>
<string name="set_excluded_desc">The content of excluded folders is hidden from your library</string>
<!-- Error Namespace | Error Labels -->
<string name="err_no_music">No music found</string>
+2 -1
View File
@@ -48,10 +48,11 @@
</style>
<style name="Widget.Component.AppWidget.Button.Base" parent="Widget.AppCompat.Button.Borderless">
<item name="android:layout_height">@dimen/height_widget_button</item>
<item name="android:layout_height">@dimen/size_unbounded</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>
</style>
<style name="Widget.Component.AppWidget.Button" parent="Widget.Component.AppWidget.Button.Base">
+2 -7
View File
@@ -54,11 +54,6 @@
<item name="android:layout_height">@dimen/size_cover_normal</item>
</style>
<style name="Widget.ImageView.Large" parent="">
<item name="android:layout_width">@dimen/size_cover_large</item>
<item name="android:layout_height">@dimen/size_cover_large</item>
</style>
<style name="Widget.ImageView.Full" parent="">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">0dp</item>
@@ -180,8 +175,8 @@
<!-- BUTTON STYLES -->
<style name="Widget.Button.Unbounded" parent="Widget.AppCompat.Button.Borderless">
<item name="android:layout_width">@dimen/size_play_pause_compact</item>
<item name="android:layout_height">@dimen/size_play_pause_compact</item>
<item name="android:layout_width">@dimen/size_unbounded</item>
<item name="android:layout_height">@dimen/size_unbounded</item>
<item name="android:background">@drawable/ui_unbounded_ripple</item>
<item name="android:scaleType">fitCenter</item>
<item name="android:padding">@dimen/spacing_micro</item>
+2 -2
View File
@@ -149,8 +149,8 @@
<Preference
app:iconSpaceReserved="false"
app:key="KEY_BLACKLIST"
app:summary="@string/set_blacklist_desc"
app:title="@string/set_blacklist" />
app:summary="@string/set_excluded_desc"
app:title="@string/set_excluded" />
</PreferenceCategory>
</PreferenceScreen>