0
public void afterTextChanged(Editable s) {
if (editText.getText().length() == 12) {
editText.setText(editText.getText().subSequence(0, editText.getText().length() - 1));
}
//problem in this part of code
if (editText.getText().length() == 2 || editText.getText().length() == 5 || editText.getText().length() == 8) {
editText.setText(editText.getText()+"/");
}
}
我怎樣才能回到輸入行的結尾?的EditText/TextWatcher讓我回到輸入行的開頭
謝謝。現在我明白它是如何工作的! –