Fix style in RTL languages

This commit is contained in:
Keramat Jokar 2022-07-13 10:17:35 +04:30 committed by GitHub
parent 6cb1cdf898
commit c9711c5870
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -201,11 +201,17 @@ public class TextSettingsCell extends FrameLayout {
MarginLayoutParams params = (MarginLayoutParams) textView.getLayoutParams(); MarginLayoutParams params = (MarginLayoutParams) textView.getLayoutParams();
if (resId == 0) { if (resId == 0) {
imageView.setVisibility(GONE); imageView.setVisibility(GONE);
params.leftMargin = 0; if (LocaleController.isRTL)
params.rightMargin = 0;
else
params.leftMargin = 0;
} else { } else {
imageView.setImageResource(resId); imageView.setImageResource(resId);
imageView.setVisibility(VISIBLE); imageView.setVisibility(VISIBLE);
params.leftMargin = AndroidUtilities.dp(71); if (LocaleController.isRTL)
params.rightMargin = AndroidUtilities.dp(71);
else
params.leftMargin = AndroidUtilities.dp(71);
} }
} }