Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

清空输入内容会出现输入框背景乱 #29

Open
dewi23 opened this issue Jan 13, 2020 · 2 comments
Open

清空输入内容会出现输入框背景乱 #29

dewi23 opened this issue Jan 13, 2020 · 2 comments

Comments

@dewi23
Copy link

dewi23 commented Jan 13, 2020

QQ图片20200113182046

@ZSFeng
Copy link

ZSFeng commented Jul 7, 2021

可以改下VerificationCodeView这个类里的删除监听方法:
微信截图_20210707172146

@iFCoder
Copy link

iFCoder commented Jul 28, 2021

可以改成这样

/**
* 监听删除
*/
private void onKeyDelete() {
for (int i = mPwdTextViews.length - 1; i >= 0; i--) {
PwdTextView tv = mPwdTextViews[i];
if (!tv.getText().toString().trim().equals("")) {
if (mEtPwd) {
tv.clearPwd();
}
tv.setText("");
// 添加删除完成监听
tv.setBackgroundDrawable(mEtBackgroundDrawableNormal);
if (i == 0) {
mPwdTextViews[0].setBackgroundDrawable(mEtBackgroundDrawableFocus);
} else {
if (i < mEtNumber) {
mPwdTextViews[i - 1].setBackgroundDrawable(mEtBackgroundDrawableFocus);
}
}
// 添加输入完成的监听
if (inputCompleteListener != null) {
inputCompleteListener.inputComplete();
}
break;
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants