Update the required or optional styles of EditText in VPN settings

- Follow the Required text indicator in the Google Material 3 guidelines

Bug: 401956268
Flag: EXEMPT refactor
Test: Manual testing
Change-Id: Ifeb1b882b34151ebef18edc32e7f2a3c116921c2
This commit is contained in:
Weng Su
2025-03-10 10:31:26 +08:00
parent a7a7482118
commit e82b0b2eea
5 changed files with 49 additions and 52 deletions

View File

@@ -76,7 +76,6 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
private TextInputGroup mServerInput;
private TextInputGroup mUsernameInput;
private TextInputGroup mPasswordInput;
private TextView mPassword;
private Spinner mProxySettings;
private TextView mProxyHost;
private TextView mProxyPort;
@@ -211,8 +210,10 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
setTitle(context.getString(R.string.vpn_connect_to, mProfile.name));
setUsernamePasswordVisibility(mProfile.type);
mUsernameInput.setHelperText(context.getString(R.string.vpn_required));
mPasswordInput.setHelperText(context.getString(R.string.vpn_required));
mUsernameInput.setLabel(context.getString(R.string.vpn_username_required));
mUsernameInput.setHelperText(context.getString(R.string.vpn_field_required));
mPasswordInput.setLabel(context.getString(R.string.vpn_password_required));
mPasswordInput.setHelperText(context.getString(R.string.vpn_field_required));
// Create a button to connect the network.
setButton(DialogInterface.BUTTON_POSITIVE,