From c9711c58709cc7ffeeedda811ecca4dbcced91b1 Mon Sep 17 00:00:00 2001 From: Keramat Jokar Date: Wed, 13 Jul 2022 10:17:35 +0430 Subject: [PATCH] Fix style in RTL languages --- .../java/org/telegram/ui/Cells/TextSettingsCell.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextSettingsCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextSettingsCell.java index efdb15ac8..3cd2dfbd3 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextSettingsCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/TextSettingsCell.java @@ -201,11 +201,17 @@ public class TextSettingsCell extends FrameLayout { MarginLayoutParams params = (MarginLayoutParams) textView.getLayoutParams(); if (resId == 0) { imageView.setVisibility(GONE); - params.leftMargin = 0; + if (LocaleController.isRTL) + params.rightMargin = 0; + else + params.leftMargin = 0; } else { imageView.setImageResource(resId); imageView.setVisibility(VISIBLE); - params.leftMargin = AndroidUtilities.dp(71); + if (LocaleController.isRTL) + params.rightMargin = AndroidUtilities.dp(71); + else + params.leftMargin = AndroidUtilities.dp(71); } }