支不支持清空录入框内容呢?
benngai123 opened this issue · comments
benngai123 commented
好像没有看到clear()之类的方法
palorotolo commented
+1
hjg8858 commented
for (int i=0;i<verificationCodeInput.getChildCount();i++){//遍历子类
verificationCodeInput.getChildAt(i).setEnabled(true);//设置可点击
EditText childAt = (EditText) verificationCodeInput.getChildAt(i);
childAt.setText("");//清空内容
if(i==0){//第一个获取焦点
verificationCodeInput.getChildAt(i).requestFocus();
verificationCodeInput.getChildAt(i).setFocusable(true);
verificationCodeInput.getChildAt(i).setFocusableInTouchMode(true);
}
}