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()+"/");
}
}
How can I go back to the end of the input line?
You could add this at the end of your method:
PS: Would be better if you describe more about your problem, so it would be easier to understand. :)