Fix the option to set a different screen lock in the "Set a PIN"

screen is displayed off the screen when the device language is set
to Arabic

To call optButton's MarginLayoutParams setMarginStart() instead of
set leftMargin.

Flag: EXEMPT bugfix

Bug: 355422248

Test: build Forrest ROM and verify the UI
Change-Id: I700b83937ecd8509864fa3c80826de0ba0437ca2
This commit is contained in:
Jason Chang
2024-08-05 08:55:10 +00:00
parent 793253aaf2
commit 58bc2e3dca

View File

@@ -116,7 +116,7 @@ public final class PasswordUtils extends com.android.settingslib.Utils {
final ViewGroup.MarginLayoutParams lp = new ViewGroup.MarginLayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
lp.leftMargin = layoutTitleParams.leftMargin;
lp.setMarginStart(layoutTitleParams.leftMargin);
lp.topMargin = (int) context.getResources().getDimensionPixelSize(
R.dimen.screen_lock_options_button_margin_top);
optButton.setPadding(0, 0, 0, 0);