MaterialSearchView icon indicating copy to clipboard operation
MaterialSearchView copied to clipboard

Return item click in list of suggestions

Open osinakayah opened this issue 7 years ago • 1 comments

How can i return the particular item clicked, is there a listener for it?

osinakayah avatar Jan 01 '19 00:01 osinakayah

@osinakayah , yes there is a way to do that

mSearchView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { String query = (String) parent.getItemAtPosition(position); mSearchView.closeSearch(); } }

Jasjot784 avatar Jun 22 '20 09:06 Jasjot784