Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当第一次编辑文本输入大于 4 位时,如何在下一个编辑文本中自动转移焦点?以及如何在删除下一个编辑文本数据时再次返回第一个编辑文本?
edittext1.addTextChangedListener(new TextWatcher() { public void onTextChanged(CharSequence s, int start, int before, int count) { if(editText.getText().toString().Length()>=4) { editText2.requestFocus(); } } });