ui: redesign headers
Redesign the header component to be more aligned with M3 guidelines. This includes moving the divider to the top when reasonable, using a smaller font size, and using a tinted coloration to separate itself from the list contents.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@android:id/title"
|
||||
style="@style/Widget.Auxio.TextView.Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Songs" />
|
||||
@@ -22,7 +22,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/disc_no"
|
||||
style="@style/Widget.Auxio.TextView.Header"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:paddingTop="@dimen/spacing_mid_medium"
|
||||
android:paddingBottom="@dimen/spacing_mid_medium"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.TitleMedium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/header_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
style="@style/Widget.Auxio.TextView.Header"
|
||||
@@ -13,10 +19,4 @@
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Songs" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/header_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -6,16 +6,21 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/header_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/header_title"
|
||||
style="@style/Widget.Auxio.TextView.Header"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
||||
app:layout_constraintBottom_toTopOf="@id/header_divider"
|
||||
app:layout_constraintEnd_toStartOf="@+id/header_button"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/header_divider"
|
||||
tools:text="Songs" />
|
||||
|
||||
<Button
|
||||
@@ -26,14 +31,8 @@
|
||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
||||
android:contentDescription="@string/lbl_sort"
|
||||
app:icon="@drawable/ic_sort_24"
|
||||
app:layout_constraintBottom_toTopOf="@id/header_divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/header_divider"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/header_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -169,7 +169,8 @@
|
||||
<item name="android:paddingEnd">@dimen/spacing_medium</item>
|
||||
<item name="android:minHeight">@dimen/size_btn</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Auxio.TitleMedium</item>
|
||||
<item name="android:textColor">?attr/colorSecondary</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Auxio.LabelLarge</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.TextView.Detail" parent="Widget.Auxio.TextView.Base">
|
||||
@@ -196,7 +197,7 @@
|
||||
|
||||
<style name="Widget.Auxio.Button.Primary" parent="Widget.Material3.Button" />
|
||||
|
||||
<style name="Widget.Auxio.Button.Secondary" parent="Widget.Material3.Button.OutlinedButton" />
|
||||
<style name="Widget.Auxio.Button.Secondary" parent="Widget.Material3.Button.TonalButton" />
|
||||
|
||||
<style name="Widget.Auxio.Button.Icon.Base" parent="Widget.Material3.Button.IconButton">
|
||||
<item name="materialThemeOverlay">@style/ThemeOverlay.Auxio.UncheckableIconButton</item>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:title="@string/set_audio">
|
||||
<PreferenceCategory android:title="@string/set_playback">
|
||||
<PreferenceCategory android:title="@string/set_playback"
|
||||
app:layout="@layout/item_bare_header">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="@string/set_key_headset_autoplay"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:title="@string/set_content">
|
||||
<PreferenceCategory app:title="@string/set_music">
|
||||
<PreferenceCategory app:title="@string/set_music"
|
||||
app:layout="@layout/item_bare_header">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:title="@string/set_personalize">
|
||||
|
||||
<PreferenceCategory app:title="@string/set_display">
|
||||
<PreferenceCategory app:title="@string/set_display"
|
||||
app:layout="@layout/item_bare_header">
|
||||
|
||||
<org.oxycblt.auxio.settings.ui.WrappedDialogPreference
|
||||
app:key="@string/set_key_home_tabs"
|
||||
|
||||
Reference in New Issue
Block a user