I use the following code to set the cursor
at the end
of customEditText(EditText
) but it brings no effect.
customEditText.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
String customEditTextText = customEditText.getText().toString();
int selection = customEditTextText.length();
customEditText.setSelection(selection);
}
}
});
Has anybody any ideas for that ?