Tweak navigation view group header style

This commit is contained in:
arkon 2020-09-27 13:41:25 -04:00
parent 3784d1a8f2
commit 7c69b1b649
4 changed files with 18 additions and 21 deletions

View File

@ -3,8 +3,6 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeightSmall" android:layout_height="?attr/listPreferredItemHeightSmall"
android:background="?attr/colorPrimary"
android:elevation="2dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="?attr/listPreferredItemPaddingStart" android:paddingStart="?attr/listPreferredItemPaddingStart"
@ -17,8 +15,7 @@
android:layout_weight="1" android:layout_weight="1"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
android:textColor="?attr/colorOnPrimary"
tools:text="Header" /> tools:text="Header" />
<ImageView <ImageView

View File

@ -41,7 +41,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/color_filter_r_value" android:text="@string/color_filter_r_value"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_red" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_red"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_red" /> app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_red" />
@ -51,7 +51,7 @@
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_red" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_red"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_red" /> app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_red" />
@ -75,7 +75,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/color_filter_g_value" android:text="@string/color_filter_g_value"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_green" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_green"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_green" /> app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_green" />
@ -85,7 +85,7 @@
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_green" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_green"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_green" /> app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_green" />
@ -109,7 +109,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/color_filter_b_value" android:text="@string/color_filter_b_value"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_blue" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_blue"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_blue" /> app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_blue" />
@ -119,7 +119,7 @@
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_blue" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_blue"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_blue" /> app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_blue" />
@ -143,7 +143,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/color_filter_a_value" android:text="@string/color_filter_a_value"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_alpha" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_alpha"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_alpha" /> app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_alpha" />
@ -153,7 +153,7 @@
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_alpha" app:layout_constraintBottom_toBottomOf="@id/seekbar_color_filter_alpha"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_alpha" /> app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_alpha" />
@ -208,7 +208,7 @@
android:id="@+id/txt_brightness_seekbar_icon" android:id="@+id/txt_brightness_seekbar_icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
android:tint="?attr/colorOnBackground" android:tint="?attr/colorOnBackground"
app:layout_constraintBottom_toBottomOf="@id/brightness_seekbar" app:layout_constraintBottom_toBottomOf="@id/brightness_seekbar"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -219,7 +219,7 @@
android:id="@+id/txt_brightness_seekbar_value" android:id="@+id/txt_brightness_seekbar_value"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary" android:textAppearance="@style/TextAppearance.Medium.SubHeading"
app:layout_constraintBottom_toBottomOf="@id/brightness_seekbar" app:layout_constraintBottom_toBottomOf="@id/brightness_seekbar"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/brightness_seekbar" /> app:layout_constraintTop_toTopOf="@id/brightness_seekbar" />

View File

@ -6,15 +6,13 @@
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
style="@style/TextAppearance.Regular.SubHeading.Secondary" style="@style/TextAppearance.Medium.SubHeading"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:paddingStart="@dimen/material_component_text_fields_padding_above_and_below_label" android:paddingStart="@dimen/material_component_text_fields_padding_above_and_below_label"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingEnd="@dimen/material_component_text_fields_padding_above_and_below_label" android:paddingEnd="@dimen/material_component_text_fields_padding_above_and_below_label"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:textAllCaps="true"
tools:text="Title" /> tools:text="Title" />
</FrameLayout> </FrameLayout>

View File

@ -83,10 +83,6 @@
<item name="android:textSize">14sp</item> <item name="android:textSize">14sp</item>
</style> </style>
<style name="TextAppearance.Regular.SubHeading.Secondary">
<item name="android:textColor">?android:attr/textColorSecondary</item>
</style>
<style name="TextAppearance.Medium"> <style name="TextAppearance.Medium">
<item name="android:fontFamily">sans-serif-medium</item> <item name="android:fontFamily">sans-serif-medium</item>
</style> </style>
@ -103,6 +99,12 @@
<item name="android:textColor">?android:attr/textColorHint</item> <item name="android:textColor">?android:attr/textColorHint</item>
</style> </style>
<style name="TextAppearance.Medium.SubHeading">
<item name="android:textAllCaps">true</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">14sp</item>
</style>
<style name="TextAppearance.Widget.Button" parent="TextAppearance.MaterialComponents.Button"> <style name="TextAppearance.Widget.Button" parent="TextAppearance.MaterialComponents.Button">
<item name="android:letterSpacing">0</item> <item name="android:letterSpacing">0</item>
</style> </style>