public void passwordVisibilityToggleRequested() throws NoSuchFieldException, IllegalAccessException {
// Store the current cursor position
int selection = getEditText().getSelectionEnd();
if (!getEditText().getText().toString().isEmpty()) {
getEditText().setTransformationMethod(PasswordTransformationMethod.getInstance());
toggleEnabled("mPasswordToggledVisible", false);
mPasswordToggleView.setChecked(false);
} else {
getEditText().setTransformationMethod(null);
toggleEnabled("mPasswordToggledVisible", true);
mPasswordToggleView.setChecked(true);
}
// And restore the cursor position
getEditText().setSelection(selection);
}
PinTextInputLayout.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:africastalking-android
作者:
评论列表
文章目录