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:
Alexander Capehart
2023-01-16 19:35:16 -07:00
parent ad9d2f2d9e
commit fb93b82b2b
18 changed files with 55 additions and 45 deletions
@@ -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" />
+5 -1
View File
@@ -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
View File
@@ -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>
+9 -10
View File
@@ -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>