From 311fe5c604fe2b85bda58b0005af22a65eee6397 Mon Sep 17 00:00:00 2001 From: Fahim Date: Mon, 14 Feb 2022 18:13:40 +0600 Subject: [PATCH 1/9] 4871-R-Crash_on_font_preview_page issue: https://gitlab.e.foundation/e/backlog/-/issues/4871 App crash on update font from `Settings/Display/Advanced/Font size` section because textAppearance is not loading for textView perfectly. --- res/layout/font_size_preview.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/res/layout/font_size_preview.xml b/res/layout/font_size_preview.xml index 669ece05341..36cab553a6a 100644 --- a/res/layout/font_size_preview.xml +++ b/res/layout/font_size_preview.xml @@ -36,25 +36,25 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/font_size_preview_text_headline" - android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Headline"/> + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Headline"/> + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Title"/> + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Subhead"/> + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Body1"/> -- GitLab From 228e0ceee1784a73977fd3fc3f64886c4db3e0aa Mon Sep 17 00:00:00 2001 From: Fahim Date: Tue, 15 Feb 2022 20:10:09 +0600 Subject: [PATCH 2/9] WIP: remove textAppearanch from font_size_preview --- res/layout/font_size_preview.xml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/res/layout/font_size_preview.xml b/res/layout/font_size_preview.xml index 36cab553a6a..eb3ce77b3df 100644 --- a/res/layout/font_size_preview.xml +++ b/res/layout/font_size_preview.xml @@ -35,26 +35,22 @@ + android:text="@string/font_size_preview_text_headline"/> + android:text="@string/font_size_preview_text_title"/> + android:text="@string/font_size_preview_text_subtitle"/> + android:text="@string/font_size_preview_text_body"/> -- GitLab From 56ef8f6c181d170150c08da881b9e2a611072706 Mon Sep 17 00:00:00 2001 From: Fahim Date: Tue, 22 Feb 2022 21:27:55 +0600 Subject: [PATCH 3/9] WIP: set TouchBlockingFrameLayout as mother layout --- res/layout/font_size_preview.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/res/layout/font_size_preview.xml b/res/layout/font_size_preview.xml index eb3ce77b3df..a4b6c9277b0 100644 --- a/res/layout/font_size_preview.xml +++ b/res/layout/font_size_preview.xml @@ -19,7 +19,7 @@ android:layout_height="match_parent" android:fillViewport="true" > - @@ -40,17 +40,20 @@ + android:text="@string/font_size_preview_text_title" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Title"/> + android:text="@string/font_size_preview_text_subtitle" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"/> + android:text="@string/font_size_preview_text_body" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"/> - + -- GitLab From 80dea106416df9918477e8abec28c67befa77c86 Mon Sep 17 00:00:00 2001 From: Fahim Date: Tue, 22 Feb 2022 21:45:33 +0600 Subject: [PATCH 4/9] WIP: add missing headLine textAppearance --- res/layout/font_size_preview.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/layout/font_size_preview.xml b/res/layout/font_size_preview.xml index a4b6c9277b0..13f8b5747f6 100644 --- a/res/layout/font_size_preview.xml +++ b/res/layout/font_size_preview.xml @@ -35,7 +35,8 @@ + android:text="@string/font_size_preview_text_headline" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Headline"/> Date: Tue, 22 Feb 2022 23:22:25 +0600 Subject: [PATCH 5/9] WIP: add custom style with missing textColorLink attribute --- res/layout/font_size_preview.xml | 12 ++++++------ res/values/styles.xml | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/res/layout/font_size_preview.xml b/res/layout/font_size_preview.xml index 13f8b5747f6..515433ac9ac 100644 --- a/res/layout/font_size_preview.xml +++ b/res/layout/font_size_preview.xml @@ -19,7 +19,7 @@ android:layout_height="match_parent" android:fillViewport="true" > - @@ -36,25 +36,25 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/font_size_preview_text_headline" - android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Headline"/> + android:textAppearance="@style/customHeadlineStyle"/> + android:textAppearance="@style/customTitleStyle"/> + android:textAppearance="@style/customSubheadStyle"/> + android:textAppearance="@style/customBody1Style"/> - + diff --git a/res/values/styles.xml b/res/values/styles.xml index fb022248c74..073bf80e1b5 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -803,4 +803,19 @@ @lineageos.platform:color/color_default_accent + + + + + + + -- GitLab From a4ef8ee99ba036dffd2432cd49ef555b974422b1 Mon Sep 17 00:00:00 2001 From: Fahim Date: Wed, 23 Feb 2022 02:05:57 +0600 Subject: [PATCH 6/9] WIP: add custom style with missing attributes --- res/values/styles.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/res/values/styles.xml b/res/values/styles.xml index 073bf80e1b5..ec6279d2916 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -804,18 +804,54 @@ -- GitLab From 4f0bf3631204d4f7fe1ac076393e40fc1324ffe4 Mon Sep 17 00:00:00 2001 From: Fahim Date: Wed, 23 Feb 2022 08:28:26 +0600 Subject: [PATCH 7/9] WIP: fix typo --- res/values/styles.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/res/values/styles.xml b/res/values/styles.xml index ec6279d2916..b7a8bb2f728 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -810,7 +810,6 @@ @lineageos.platform:color/color_default_accent 16sp sans-serif - @dimen/text_line_spacing_multiplier_material @lineageos.platform:color/color_default_accent @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text @@ -823,7 +822,6 @@ @lineageos.platform:color/color_default_accent 16sp sans-serif - @dimen/text_line_spacing_multiplier_material @lineageos.platform:color/color_default_accent @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text @@ -836,7 +834,6 @@ @lineageos.platform:color/color_default_accent 16sp sans-serif - @dimen/text_line_spacing_multiplier_material @lineageos.platform:color/color_default_accent @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text @@ -849,7 +846,6 @@ @lineageos.platform:color/color_default_accent 16sp sans-serif - @dimen/text_line_spacing_multiplier_material @lineageos.platform:color/color_default_accent @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text -- GitLab From f68d8135e2377155cb63c85782ee2b41d24b83e9 Mon Sep 17 00:00:00 2001 From: Fahim Date: Wed, 23 Feb 2022 16:38:42 +0600 Subject: [PATCH 8/9] WIP: fix preview TextView issue for display size settings --- res/layout/conversation_message_content.xml | 6 ++++-- res/layout/conversation_message_icon.xml | 3 ++- res/values/styles.xml | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/res/layout/conversation_message_content.xml b/res/layout/conversation_message_content.xml index bdb0ea73632..2b0c0ac1ed8 100644 --- a/res/layout/conversation_message_content.xml +++ b/res/layout/conversation_message_content.xml @@ -31,13 +31,15 @@ android:id="@+id/message_text" android:textSize="@dimen/conversation_message_text_size" android:layout_width="wrap_content" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:textAppearance="@style/customTitleStyle" /> + android:textSize="@dimen/conversation_status_text_size" + android:textAppearance="@style/customBody1Style" /> diff --git a/res/layout/conversation_message_icon.xml b/res/layout/conversation_message_icon.xml index 9f9f0ac76e8..157671173dc 100644 --- a/res/layout/conversation_message_icon.xml +++ b/res/layout/conversation_message_icon.xml @@ -21,4 +21,5 @@ android:fontFamily="sans-serif" android:textStyle="bold" android:textSize="@dimen/conversation_message_contact_icon_text_size" - android:gravity="center" /> + android:gravity="center" + android:textAppearance="@style/customTitleStyle" /> diff --git a/res/values/styles.xml b/res/values/styles.xml index b7a8bb2f728..3524a9390a8 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -808,7 +808,7 @@ @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text @lineageos.platform:color/color_default_accent - 16sp + 24sp sans-serif @lineageos.platform:color/color_default_accent @lineageos.platform:color/color_default_primary_text @@ -820,7 +820,7 @@ @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text @lineageos.platform:color/color_default_accent - 16sp + 18sp sans-serif @lineageos.platform:color/color_default_accent @lineageos.platform:color/color_default_primary_text @@ -832,7 +832,7 @@ @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text @lineageos.platform:color/color_default_accent - 16sp + 20sp sans-serif @lineageos.platform:color/color_default_accent @lineageos.platform:color/color_default_primary_text -- GitLab From e4afcc986c539833c7851723b418feeb4fa6da1f Mon Sep 17 00:00:00 2001 From: Fahim Date: Wed, 23 Feb 2022 22:26:37 +0600 Subject: [PATCH 9/9] WIP: fix zoom preview styling --- res/layout/screen_zoom_activity.xml | 2 +- res/layout/screen_zoom_preview_1.xml | 2 +- res/layout/screen_zoom_preview_app_icon.xml | 2 +- res/layout/screen_zoom_preview_settings.xml | 52 ++++++++++----------- res/values/styles.xml | 12 +++++ 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/res/layout/screen_zoom_activity.xml b/res/layout/screen_zoom_activity.xml index 4cfa7b6ae98..0d6906b014f 100644 --- a/res/layout/screen_zoom_activity.xml +++ b/res/layout/screen_zoom_activity.xml @@ -93,7 +93,7 @@ android:layout_height="wrap_content" android:text="@string/screen_zoom_summary" android:layout_marginBottom="16dp" - android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead" /> + android:textAppearance="@style/customSubheadStyle" /> diff --git a/res/layout/screen_zoom_preview_1.xml b/res/layout/screen_zoom_preview_1.xml index 65d27ee6896..39598c0cfd1 100644 --- a/res/layout/screen_zoom_preview_1.xml +++ b/res/layout/screen_zoom_preview_1.xml @@ -28,7 +28,7 @@ + android:textAppearance="@style/customCaptionStyle" /> diff --git a/res/layout/screen_zoom_preview_settings.xml b/res/layout/screen_zoom_preview_settings.xml index 3401fcf1971..5afeadb47da 100644 --- a/res/layout/screen_zoom_preview_settings.xml +++ b/res/layout/screen_zoom_preview_settings.xml @@ -18,7 +18,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" - android:background="?android:attr/colorBackgroundFloating" + android:background="@lineageos.platform:color/color_default_foreground" android:importantForAccessibility="noHideDescendants"> + android:textAppearance="@style/customSubheadStyle" + android:textColor="@lineageos.platform:color/color_default_primary_text" /> + android:textAppearance="@style/customBody1Style" + android:textColor="@lineageos.platform:color/color_default_secondary_text" /> @@ -82,7 +82,7 @@ android:layout_width="48dp" android:layout_height="48dp" android:src="@drawable/ic_settings_data_usage" - android:tint="?android:attr/colorAccent" + android:tint="@lineageos.platform:color/color_default_accent" android:scaleType="center" /> + android:textAppearance="@style/customSubheadStyle" + android:textColor="@lineageos.platform:color/color_default_primary_text" /> + android:textAppearance="@style/customBody1Style" + android:textColor="@lineageos.platform:color/color_default_secondary_text" /> @@ -120,7 +120,7 @@ android:layout_width="48dp" android:layout_height="48dp" android:src="@drawable/ic_settings_display" - android:tint="?android:attr/colorAccent" + android:tint="@lineageos.platform:color/color_default_accent" android:scaleType="center" /> + android:textAppearance="@style/customSubheadStyle" + android:textColor="@lineageos.platform:color/color_default_primary_text" /> + android:textAppearance="@style/customBody1Style" + android:textColor="@lineageos.platform:color/color_default_secondary_text" /> @@ -158,7 +158,7 @@ android:layout_width="48dp" android:layout_height="48dp" android:src="@drawable/ic_settings_sound" - android:tint="?android:attr/colorAccent" + android:tint="@lineageos.platform:color/color_default_accent" android:scaleType="center" /> + android:textAppearance="@style/customSubheadStyle" + android:textColor="@lineageos.platform:color/color_default_primary_text" /> + android:textAppearance="@style/customBody1Style" + android:textColor="@lineageos.platform:color/color_default_secondary_text" /> @@ -196,7 +196,7 @@ android:layout_width="48dp" android:layout_height="48dp" android:src="@drawable/ic_settings_applications" - android:tint="?android:attr/colorAccent" + android:tint="@lineageos.platform:color/color_default_accent" android:scaleType="center" /> + android:textAppearance="@style/customSubheadStyle" + android:textColor="@lineageos.platform:color/color_default_primary_text" /> + android:textAppearance="@style/customBody1Style" + android:textColor="@lineageos.platform:color/color_default_secondary_text" /> diff --git a/res/values/styles.xml b/res/values/styles.xml index 3524a9390a8..562952abe02 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -850,4 +850,16 @@ @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text + + -- GitLab