I\'ve been struggling with this for weeks.. I have a global search that offers up a custom listview with suggestions as a user types. When a user selects an option, I want the s
I've changed the 'Go' button to 'Next', so the only method that worked for me (on API 19) is typing
closeBtn.performClick();
closeBtn.performClick();
(Clicking 'close' button twice) in the OnEditorActionListener
of the AutoCompleteTextView
.
You can get the AutoCompleteTextView
like this:
LinearLayout linearLayout1 = (LinearLayout) searchView.getChildAt(0);
LinearLayout linearLayout2 = (LinearLayout) linearLayout1.getChildAt(2);
LinearLayout linearLayout3 = (LinearLayout) linearLayout2.getChildAt(1);
AutoCompleteTextView autoComplete = (AutoCompleteTextView) linearLayout3.getChildAt(0);