PinTextInputLayout.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:Luhn 作者:
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);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号