Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to position the cursor in AutoCompleteTextView

In My app I'm using AutoCompleteTextView. When the user select a result item, one of the option is inserting the selected text into the AutoCompleteTextView. After inserting text, the cursor returns to the initial position. How can i position it in the end of the inserted text? Thanks, Eyal

like image 780
eyal Avatar asked Dec 26 '22 09:12

eyal


1 Answers

try setSelection(int index), it looks like what you are looking for

http://developer.android.com/reference/android/widget/EditText.html

I can do better with your code. You probalby need to choose the good listener to use it

like image 61
Eliott Roynette Avatar answered Dec 28 '22 12:12

Eliott Roynette