nila nila - 1 month ago 21
Android Question

How to set cursor position in EditText?

There are two

EditText
,while loading the page a text is set in the first EditText, So now cursor will be in the starting place of
EditText
, I want to set cursor position in the second EditText which contains no data. How to do this?

Answer

Where position is an int:

editText1.setSelection(position)
Comments