mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
End icon mode cannot be changed dynamically
Due to a 2 year old bug in material components: https://github.com/material-components/material-components-android/issues/503
This commit is contained in:
@@ -316,8 +316,9 @@ public class FragmentIdentity extends FragmentBase {
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
if (TextUtils.isEmpty(s))
|
||||
tilPassword.setEndIconMode(END_ICON_PASSWORD_TOGGLE);
|
||||
// https://github.com/material-components/material-components-android/issues/503
|
||||
//if (TextUtils.isEmpty(s))
|
||||
// tilPassword.setEndIconMode(END_ICON_PASSWORD_TOGGLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -511,7 +512,7 @@ public class FragmentIdentity extends FragmentBase {
|
||||
btnAutoConfig.setEnabled(false);
|
||||
pbAutoConfig.setVisibility(View.GONE);
|
||||
cbInsecure.setVisibility(View.GONE);
|
||||
tilPassword.setEndIconMode(Helper.isSecure(getContext()) ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE);
|
||||
tilPassword.setEndIconMode(id < 0 || Helper.isSecure(getContext()) ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE);
|
||||
|
||||
btnAdvanced.setVisibility(View.GONE);
|
||||
|
||||
@@ -539,7 +540,7 @@ public class FragmentIdentity extends FragmentBase {
|
||||
etEmail.setText(account.user);
|
||||
etUser.setText(account.user);
|
||||
tilPassword.getEditText().setText(account.password);
|
||||
tilPassword.setEndIconMode(Helper.isSecure(getContext()) ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE);
|
||||
//tilPassword.setEndIconMode(Helper.isSecure(getContext()) ? END_ICON_PASSWORD_TOGGLE : END_ICON_NONE);
|
||||
certificate = account.certificate_alias;
|
||||
tvCertificate.setText(certificate == null ? getString(R.string.title_optional) : certificate);
|
||||
etRealm.setText(account.realm);
|
||||
|
||||
Reference in New Issue
Block a user