home: add tab customization

Finally add tab customization. This implementation is a
bit ugly, but I had to futureproof it for playlists and I'm
planning to clean up a lot of the duplicate code across the app.

This addition notably allows a default tab to be set, which is
something that was widely requested in #12. This UI rework finally
allows it to be added.
This commit is contained in:
OxygenCobalt
2021-10-17 20:27:16 -06:00
parent a253cfccc4
commit 23d1be8ebc
39 changed files with 687 additions and 203 deletions
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="enable_theme_settings">true</bool>
</resources>
+1
View File
@@ -10,6 +10,7 @@
<!-- Size Namespace | Width & Heights for UI elements -->
<dimen name="size_btn_small">48dp</dimen>
<dimen name="size_btn_medium">56dp</dimen>
<dimen name="size_btn_large">64dp</dimen>
<dimen name="size_cover_compact">48dp</dimen>
+5 -1
View File
@@ -70,6 +70,8 @@
<string name="setting_black_mode_desc">Use a pure-black dark theme</string>
<string name="set_display">Display</string>
<string name="set_lib_tabs">Library tabs</string>
<string name="set_lib_tabs_desc">Change visibility and order of library tabs</string>
<string name="set_show_covers">Show album covers</string>
<string name="set_show_covers_desc">Turn off to save memory usage</string>
<string name="set_quality_covers">Ignore MediaStore covers</string>
@@ -120,7 +122,8 @@
<string name="desc_clear_user_queue">Clear queue</string>
<string name="desc_clear_queue_item">Remove this queue item</string>
<string name="desc_queue_handle">Move queue song</string>
<string name="desc_queue_handle">Move this queue song</string>
<string name="desc_tab_handle">Move this tab</string>
<string name="desc_clear_search">Clear search query</string>
<string name="desc_blacklist_delete">Remove excluded directory</string>
@@ -162,6 +165,7 @@
<string name="fmt_next_from">Next From: %s</string>
<string name="fmt_songs_loaded">Songs loaded: %d</string>
<plurals name="fmt_song_count">
<item quantity="one">%d Song</item>
<item quantity="other">%d Songs</item>
@@ -31,7 +31,6 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:fontFamily">@font/inter_semibold</item>
<item name="android:textColor">?attr/colorPrimary</item>
</style>
<!-- Custom button style that eliminates the weird margin that the neutral button has -->
+3 -3
View File
@@ -18,16 +18,16 @@
<item name="colorOnTertiaryContainer">?attr/colorOnPrimaryContainer</item>
<item name="colorSurface">@color/surface</item>
<item name="colorAccent">?attr/colorPrimary</item>
<item name="colorControlNormal">@color/control</item>
<item name="colorControlHighlight">@color/overlay_selection</item>
<item name="colorControlActivated">?attr/colorPrimary</item>
</style>
<!-- Base theme -->
<style name="Theme.Auxio.App" parent="Theme.Auxio.V31">
<!-- Values -->
<item name="colorOutline">@color/overlay_stroke</item>
<item name="colorAccent">?attr/colorSecondary</item>
<item name="colorControlHighlight">@color/overlay_selection</item>
<item name="colorControlActivated">?attr/colorSecondary</item>
<!-- Android component magic -->
<item name="android:textColorHighlight">@color/overlay_text_highlight</item>
+1 -1
View File
@@ -5,7 +5,7 @@
<!-- Base toolbar style -->
<style name="Widget.Auxio.Toolbar" parent="ThemeOverlay.Material3.ActionBar">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">?android:attr/actionBarSize</item>
<item name="android:layout_height">@dimen/size_btn_medium</item>
<item name="titleTextAppearance">@style/TextAppearance.ToolbarTitle</item>
</style>