From 84026afb92f83c37c6b346f74baaf5bac654489e Mon Sep 17 00:00:00 2001 From: Grishka Date: Wed, 11 Oct 2023 00:49:40 +0300 Subject: [PATCH] A bunch of minor RTL fixes --- mastodon/src/main/res/drawable/ic_arrow_right_24px.xml | 3 ++- mastodon/src/main/res/layout/display_item_header.xml | 3 ++- .../src/main/res/layout/display_item_section_header.xml | 3 ++- mastodon/src/main/res/layout/fragment_discover.xml | 3 ++- mastodon/src/main/res/layout/item_account_list.xml | 3 ++- mastodon/src/main/res/layout/item_account_switcher.xml | 6 ++++-- mastodon/src/main/res/layout/item_dropdown_menu.xml | 3 ++- mastodon/src/main/res/layout/item_generic_list_content.xml | 6 ++++-- mastodon/src/main/res/layout/item_list_header.xml | 6 ++++-- mastodon/src/main/res/layout/item_text_with_icon.xml | 3 ++- 10 files changed, 26 insertions(+), 13 deletions(-) diff --git a/mastodon/src/main/res/drawable/ic_arrow_right_24px.xml b/mastodon/src/main/res/drawable/ic_arrow_right_24px.xml index 6062a6d4c..55e7c6463 100644 --- a/mastodon/src/main/res/drawable/ic_arrow_right_24px.xml +++ b/mastodon/src/main/res/drawable/ic_arrow_right_24px.xml @@ -2,7 +2,8 @@ android:width="24dp" android:height="24dp" android:viewportWidth="24" - android:viewportHeight="24"> + android:viewportHeight="24" + android:autoMirrored="true"> diff --git a/mastodon/src/main/res/layout/display_item_header.xml b/mastodon/src/main/res/layout/display_item_header.xml index e5d7cc31f..9151d9869 100644 --- a/mastodon/src/main/res/layout/display_item_header.xml +++ b/mastodon/src/main/res/layout/display_item_header.xml @@ -73,8 +73,9 @@ android:singleLine="true" android:ellipsize="end" android:textAppearance="@style/m3_body_medium" - android:gravity="center_vertical" + android:gravity="center_vertical|start" android:textColor="?colorM3OnSurfaceVariant" + android:textAlignment="viewStart" tools:text="9h ago ยท \@Gargron@mastodon.social"/> \ No newline at end of file diff --git a/mastodon/src/main/res/layout/display_item_section_header.xml b/mastodon/src/main/res/layout/display_item_section_header.xml index 7da889c67..7f2c11f96 100644 --- a/mastodon/src/main/res/layout/display_item_section_header.xml +++ b/mastodon/src/main/res/layout/display_item_section_header.xml @@ -15,7 +15,8 @@ android:layout_width="0dp" android:layout_height="24dp" android:layout_weight="1" - android:gravity="center_vertical" + android:gravity="center_vertical|start" + android:textAlignment="viewStart" android:textAppearance="@style/m3_title_medium" android:textColor="?colorM3OnSurface" android:singleLine="true" diff --git a/mastodon/src/main/res/layout/fragment_discover.xml b/mastodon/src/main/res/layout/fragment_discover.xml index 90dd462d3..a28ab467a 100644 --- a/mastodon/src/main/res/layout/fragment_discover.xml +++ b/mastodon/src/main/res/layout/fragment_discover.xml @@ -32,7 +32,8 @@ android:id="@+id/search_text" android:layout_width="match_parent" android:layout_height="match_parent" - android:gravity="center_vertical" + android:gravity="center_vertical|start" + android:textAlignment="viewStart" android:singleLine="true" android:textColor="?colorM3OnSurfaceVariant" android:textAppearance="@style/m3_body_large" diff --git a/mastodon/src/main/res/layout/item_account_list.xml b/mastodon/src/main/res/layout/item_account_list.xml index 99b57d3f7..65e0c1a15 100644 --- a/mastodon/src/main/res/layout/item_account_list.xml +++ b/mastodon/src/main/res/layout/item_account_list.xml @@ -41,9 +41,10 @@ android:layout_marginStart="4dp" android:singleLine="true" android:ellipsize="end" - android:gravity="center_vertical" + android:gravity="center_vertical|start" android:textAppearance="@style/m3_body_medium" android:textColor="?colorM3Secondary" + android:textAlignment="viewStart" tools:text="\@user@server"/> diff --git a/mastodon/src/main/res/layout/item_account_switcher.xml b/mastodon/src/main/res/layout/item_account_switcher.xml index 69eba2415..26e8806f5 100644 --- a/mastodon/src/main/res/layout/item_account_switcher.xml +++ b/mastodon/src/main/res/layout/item_account_switcher.xml @@ -32,7 +32,8 @@ android:layout_toStartOf="@id/radiobtn" android:textAppearance="@style/m3_body_large" android:textColor="?colorM3OnSurface" - android:gravity="center_vertical" + android:gravity="center_vertical|start" + android:textAlignment="viewStart" android:singleLine="true" android:ellipsize="end"/> @@ -46,7 +47,8 @@ android:textColor="?colorM3OnSurfaceVariant" android:textAppearance="@style/m3_body_medium" android:singleLine="true" - android:gravity="center_vertical" + android:gravity="center_vertical|start" + android:textAlignment="viewStart" android:ellipsize="end"/> \ No newline at end of file diff --git a/mastodon/src/main/res/layout/item_dropdown_menu.xml b/mastodon/src/main/res/layout/item_dropdown_menu.xml index 46483fcbf..8f217b590 100644 --- a/mastodon/src/main/res/layout/item_dropdown_menu.xml +++ b/mastodon/src/main/res/layout/item_dropdown_menu.xml @@ -7,11 +7,12 @@ android:paddingEnd="24dp" android:drawablePadding="16dp" android:maxLines="2" - android:gravity="center_vertical" + android:gravity="center_vertical|start" android:textAppearance="@style/m3_body_large" android:textColor="?colorM3OnSurface" android:drawableTint="?colorM3OnSurface" android:ellipsize="end" + android:textAlignment="viewStart" tools:text="Menu item"> \ No newline at end of file diff --git a/mastodon/src/main/res/layout/item_generic_list_content.xml b/mastodon/src/main/res/layout/item_generic_list_content.xml index b7ee8f6f4..a504b08f4 100644 --- a/mastodon/src/main/res/layout/item_generic_list_content.xml +++ b/mastodon/src/main/res/layout/item_generic_list_content.xml @@ -22,9 +22,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="24dp" - android:gravity="center_vertical" + android:gravity="center_vertical|start" android:textAppearance="@style/m3_body_large" android:textColor="?colorM3OnSurface" + android:textAlignment="viewStart" tools:text="Title"/> diff --git a/mastodon/src/main/res/layout/item_list_header.xml b/mastodon/src/main/res/layout/item_list_header.xml index 6837e06bd..91c272959 100644 --- a/mastodon/src/main/res/layout/item_list_header.xml +++ b/mastodon/src/main/res/layout/item_list_header.xml @@ -15,7 +15,8 @@ android:layout_marginBottom="8dp" android:textAppearance="@style/m3_headline_medium" android:minHeight="36dp" - android:gravity="center_vertical" + android:gravity="center_vertical|start" + android:textAlignment="viewStart" android:textColor="?colorM3OnSurface" tools:text="Title"/> @@ -26,7 +27,8 @@ android:textAppearance="@style/m3_title_medium" android:textColor="?colorM3OnSurfaceVariant" android:minHeight="24dp" - android:gravity="center_vertical" + android:gravity="center_vertical|start" + android:textAlignment="viewStart" tools:text="Subtitle"/> \ No newline at end of file diff --git a/mastodon/src/main/res/layout/item_text_with_icon.xml b/mastodon/src/main/res/layout/item_text_with_icon.xml index 01c27abab..c3453d8bf 100644 --- a/mastodon/src/main/res/layout/item_text_with_icon.xml +++ b/mastodon/src/main/res/layout/item_text_with_icon.xml @@ -3,7 +3,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="56dp" - android:gravity="center_vertical" + android:gravity="center_vertical|start" + android:textAlignment="viewStart" android:textColor="?colorM3OnSurface" android:textAppearance="@style/m3_body_large" android:singleLine="true"