Reputation: 699
I want to place the cursor after 2 spaces in EditText
. Can anybody tell me how to do that? I am trying to use
et.setSelection(2);
but its not working.
Upvotes: 3
Views: 1077
Reputation: 14590
Try to use like this..before set the the cursor position there must be some text at the starting there is no text that's why it is not working.. so try like this..
et.setText(" ");
et.setSelection(2);
Upvotes: 4