Skip to content

验证码输入错误清空输入框 #7

@zhaoweih

Description

@zhaoweih
 /**
     * 清空验证码输入框
     */
    public void setEmpty() {
        EditText editText;
        for (int i = mEtNumber - 1; i >= 0; i--) {
            editText = (EditText) getChildAt(i);
            editText.setText("");
            if (i == 0) {
                editText.setCursorVisible(true);
                editText.requestFocus();
            }
        }
    }

Activity

jiaoyaning

jiaoyaning commented on Aug 8, 2019

@jiaoyaning
Owner

代码已更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fix已解决

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jiaoyaning@zhaoweih

        Issue actions

          验证码输入错误清空输入框 · Issue #7 · jiaoyaning/VerificationCodeView