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,10 +201,16 @@ public class TextSettingsCell extends FrameLayout {
MarginLayoutParams params = (MarginLayoutParams) textView.getLayoutParams();
if (resId == 0) {
imageView.setVisibility(GONE);
if (LocaleController.isRTL)
params.rightMargin = 0;
else
params.leftMargin = 0;
} else {
imageView.setImageResource(resId);
imageView.setVisibility(VISIBLE);
if (LocaleController.isRTL)
params.rightMargin = AndroidUtilities.dp(71);
else
params.leftMargin = AndroidUtilities.dp(71);
}
}