I'm using SearchView as below in my code :
xml :
<android.support.v7.widget.SearchView
android:id="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
app:iconifiedByDefault="false"
app:queryBackground="@color/transparant"
app:queryHint="@string/search"
app:searchIcon="@drawable/ic_search">
Java :
mSearchView = (SearchView) rootView.findViewById(R.id.searchView);
txtSearchText = (TextView) mSearchView.findViewById(android.support.v7.appcompat.R.id.search_src_text);
txtSearchText.setOnClickListener(this);
onCLick :
case R.id.search_src_text:
loadPlacePicker();
break;
But, the issue is SearchView needs a double click to open up PlacePicker. I need to open PlacePicker on the single onClick Event of SearchView. How do I do that?
Use this.
}
XML layout code