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
Asked
Active
Viewed 4,016 times
5
-
please put related code here. – Zeeshan Khan May 21 '14 at 07:34
-
autoCompleteTextView.setText(title); – eyal May 21 '14 at 07:37
1 Answers
11
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

Eliott Roynette
- 716
- 8
- 21
-
mEditTextLocation.setSelection(mEditTextLocation.getText().toString().trim().length());// End point Cursor – Ashwin H Jul 02 '18 at 11:01