Skip to content

Commit

Permalink
Tweak navigation view group header style
Browse files Browse the repository at this point in the history
  • Loading branch information
arkon committed Sep 27, 2020
1 parent 3784d1a commit 7c69b1b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
5 changes: 1 addition & 4 deletions app/src/main/res/layout/navigation_view_group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeightSmall"
android:background="?attr/colorPrimary"
android:elevation="2dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="?attr/listPreferredItemPaddingStart"
Expand All @@ -17,8 +15,7 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="?attr/colorOnPrimary"
android:textAppearance="@style/TextAppearance.Medium.SubHeading"
tools:text="Header" />

<ImageView
Expand Down
20 changes: 10 additions & 10 deletions app/src/main/res/layout/reader_color_filter_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_red" />
Expand All @@ -51,7 +51,7 @@
android:layout_width="30dp"
android:layout_height="wrap_content"
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_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_red" />
Expand All @@ -75,7 +75,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_green" />
Expand All @@ -85,7 +85,7 @@
android:layout_width="30dp"
android:layout_height="wrap_content"
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_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_green" />
Expand All @@ -109,7 +109,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_blue" />
Expand All @@ -119,7 +119,7 @@
android:layout_width="30dp"
android:layout_height="wrap_content"
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_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_blue" />
Expand All @@ -143,7 +143,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_alpha" />
Expand All @@ -153,7 +153,7 @@
android:layout_width="30dp"
android:layout_height="wrap_content"
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_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/seekbar_color_filter_alpha" />
Expand Down Expand Up @@ -208,7 +208,7 @@
android:id="@+id/txt_brightness_seekbar_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Regular.SubHeading.Secondary"
android:textAppearance="@style/TextAppearance.Medium.SubHeading"
android:tint="?attr/colorOnBackground"
app:layout_constraintBottom_toBottomOf="@id/brightness_seekbar"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -219,7 +219,7 @@
android:id="@+id/txt_brightness_seekbar_value"
android:layout_width="30dp"
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_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/brightness_seekbar" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@

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

</FrameLayout>
10 changes: 6 additions & 4 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@
<item name="android:textSize">14sp</item>
</style>

<style name="TextAppearance.Regular.SubHeading.Secondary">
<item name="android:textColor">?android:attr/textColorSecondary</item>
</style>

<style name="TextAppearance.Medium">
<item name="android:fontFamily">sans-serif-medium</item>
</style>
Expand All @@ -103,6 +99,12 @@
<item name="android:textColor">?android:attr/textColorHint</item>
</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">
<item name="android:letterSpacing">0</item>
</style>
Expand Down

0 comments on commit 7c69b1b

Please sign in to comment.