I have a AutocompleteTextView and it works fine. When I write a word it shows the relevant result but I want to show all items without writing any word in AutocompleteTextVi
You need to call requestFocus();
to show keyboard, otherwise keyboard does not pop up.
The method forcefully shows drop-down list.
autocomptv.setOnTouchListener(new OnTouchListener() {
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(View paramView, MotionEvent paramMotionEvent) {
// TODO Auto-generated method stub
autocomptv.showDropDown();
autocomptv.requestFocus();
return false;
}
});