I'm using the AutoCompleteTextView
to show a dropdown list when the user enter a word , but I would like the dropdown list to show when he first tap in the field.
Maybe it would be better with a spinner but I would have no text input...
Asked
Active
Viewed 417 times
1

Entretoize
- 2,124
- 3
- 23
- 44
-
2https://stackoverflow.com/questions/2126717/android-autocompletetextview-show-suggestions-when-no-text-entered – Abubakker Moallim Feb 22 '18 at 08:15
-
Possible duplicate of [Android: AutoCompleteTextView show suggestions when no text entered](https://stackoverflow.com/questions/2126717/android-autocompletetextview-show-suggestions-when-no-text-entered) – Manohar Feb 22 '18 at 09:04
1 Answers
1
Just call autoCompleteTextView.showDropDown() in onTouch method.
mAnswer.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
mAnswer.showDropDown();
}
return false;
}
});

Tung Tran
- 2,885
- 2
- 17
- 24