From d6bb5b7b3a41c555138de44d55e9b9ff306a11d8 Mon Sep 17 00:00:00 2001 From: Grishka Date: Thu, 7 Apr 2022 18:26:45 +0300 Subject: [PATCH] Use sp units for text sizes where they don't break layout --- mastodon/src/main/res/layout/display_item_text.xml | 1 + mastodon/src/main/res/layout/fragment_compose.xml | 2 ++ mastodon/src/main/res/layout/fragment_profile.xml | 3 +++ mastodon/src/main/res/layout/item_instance_catalog.xml | 5 ++++- mastodon/src/main/res/layout/item_profile_about.xml | 2 ++ mastodon/src/main/res/layout/item_report_choice.xml | 2 ++ mastodon/src/main/res/layout/item_settings_footer.xml | 5 +++-- mastodon/src/main/res/layout/item_settings_header.xml | 2 +- mastodon/src/main/res/layout/item_settings_switch.xml | 2 +- mastodon/src/main/res/layout/item_settings_text.xml | 2 +- mastodon/src/main/res/layout/item_settings_theme_subitem.xml | 4 +++- 11 files changed, 23 insertions(+), 7 deletions(-) diff --git a/mastodon/src/main/res/layout/display_item_text.xml b/mastodon/src/main/res/layout/display_item_text.xml index 294f254f2..90d06c6a8 100644 --- a/mastodon/src/main/res/layout/display_item_text.xml +++ b/mastodon/src/main/res/layout/display_item_text.xml @@ -12,6 +12,7 @@ android:id="@+id/text" android:layout_width="match_parent" android:layout_height="wrap_content" + android:textSize="16sp" android:textAppearance="@style/m3_body_large"/> \ No newline at end of file diff --git a/mastodon/src/main/res/layout/item_report_choice.xml b/mastodon/src/main/res/layout/item_report_choice.xml index 5241df17d..27ecd7588 100644 --- a/mastodon/src/main/res/layout/item_report_choice.xml +++ b/mastodon/src/main/res/layout/item_report_choice.xml @@ -21,6 +21,7 @@ android:layout_toEndOf="@id/checkbox" android:layout_marginStart="16dp" android:textAppearance="@style/m3_title_medium" + android:textSize="16sp" tools:text="Title"/> \ No newline at end of file diff --git a/mastodon/src/main/res/layout/item_settings_footer.xml b/mastodon/src/main/res/layout/item_settings_footer.xml index 1f39e51e0..555cdb9ee 100644 --- a/mastodon/src/main/res/layout/item_settings_footer.xml +++ b/mastodon/src/main/res/layout/item_settings_footer.xml @@ -2,8 +2,9 @@ \ No newline at end of file diff --git a/mastodon/src/main/res/layout/item_settings_header.xml b/mastodon/src/main/res/layout/item_settings_header.xml index f73ce0ba0..d0cca7756 100644 --- a/mastodon/src/main/res/layout/item_settings_header.xml +++ b/mastodon/src/main/res/layout/item_settings_header.xml @@ -3,7 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:textSize="14dp" + android:textSize="14sp" android:fontFamily="sans-serif-medium" android:textColor="?android:colorAccent" android:padding="16dp" diff --git a/mastodon/src/main/res/layout/item_settings_switch.xml b/mastodon/src/main/res/layout/item_settings_switch.xml index 6bec213ce..d3fc123cd 100644 --- a/mastodon/src/main/res/layout/item_settings_switch.xml +++ b/mastodon/src/main/res/layout/item_settings_switch.xml @@ -22,7 +22,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:textSize="16dp" + android:textSize="16sp" android:textColor="?android:textColorPrimary" android:singleLine="true" android:ellipsize="end" diff --git a/mastodon/src/main/res/layout/item_settings_text.xml b/mastodon/src/main/res/layout/item_settings_text.xml index bfaac1048..45d35542e 100644 --- a/mastodon/src/main/res/layout/item_settings_text.xml +++ b/mastodon/src/main/res/layout/item_settings_text.xml @@ -6,7 +6,7 @@ android:paddingLeft="16dp" android:paddingRight="16dp" android:gravity="center_vertical" - android:textSize="16dp" + android:textSize="16sp" android:textColor="?android:textColorPrimary" android:singleLine="true" android:ellipsize="end" diff --git a/mastodon/src/main/res/layout/item_settings_theme_subitem.xml b/mastodon/src/main/res/layout/item_settings_theme_subitem.xml index 9abc17caa..93d24295f 100644 --- a/mastodon/src/main/res/layout/item_settings_theme_subitem.xml +++ b/mastodon/src/main/res/layout/item_settings_theme_subitem.xml @@ -17,9 +17,11 @@