From 1a35a7048d330e14a1dcfda3fda4ca5a223ef8ec Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 11 Sep 2024 16:20:39 +0200 Subject: [PATCH] Improved emoji reaction picker accessibility when font size is increased a lot at OS level --- .../res/layout/chat_emoji_reaction_picker.xml | 27 +++++++++---------- app/src/main/res/values/dimen.xml | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/app/src/main/res/layout/chat_emoji_reaction_picker.xml b/app/src/main/res/layout/chat_emoji_reaction_picker.xml index cd823c49c..727219b03 100644 --- a/app/src/main/res/layout/chat_emoji_reaction_picker.xml +++ b/app/src/main/res/layout/chat_emoji_reaction_picker.xml @@ -1,6 +1,7 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> @@ -32,8 +33,6 @@ android:onClick="@{() -> model.sendReaction(@string/emoji_thumbs_up)}" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginEnd="5dp" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:paddingStart="10dp" @@ -42,11 +41,12 @@ android:text="@string/emoji_thumbs_up" android:textSize="@dimen/chat_bubble_long_press_emoji_reaction_size" android:background="@{model.ourReactionIndex == 0 ? @drawable/shape_squircle_gray_200_background : @drawable/shape_empty, default=@drawable/shape_squircle_gray_200_background}" - app:layout_constraintHorizontal_chainStyle="spread_inside" + app:layout_constraintHorizontal_chainStyle="spread" app:layout_constraintTop_toTopOf="@id/emojis_background" app:layout_constraintBottom_toBottomOf="@id/emojis_background" app:layout_constraintStart_toStartOf="@id/emojis_background" - app:layout_constraintEnd_toStartOf="@id/love"/> + app:layout_constraintEnd_toStartOf="@id/love" + tools:ignore="SpUsage" /> + app:layout_constraintEnd_toStartOf="@id/laughing" + tools:ignore="SpUsage" /> + app:layout_constraintEnd_toStartOf="@id/surprised" + tools:ignore="SpUsage" /> + app:layout_constraintEnd_toStartOf="@id/tear" + tools:ignore="SpUsage" /> + app:layout_constraintEnd_toStartOf="@id/plus" + tools:ignore="SpUsage" /> 8dp 2dp 8dp - 30sp + 30dp 87dp 150dp 152dp