How to make the suggestions in the QSB editable when the user clicks on it? I.e. via an edit icon on the right, like on the Google Search app.
Is there a standard way to do it, or does it require to implement it from scratch, i.e. customized suggestion list item layout in xml with a button, etc.?
I couldn't find any info on that on https://developer.android.com/guide/topics/search/searchable-config.html etc.
Edit: I'm currently trying this for testing, after the search intent is invoked, I start a new search with the query preset - it works but it's too slow, because it closes the search UI and reopens it, which is not what I want. I'd like the search UI to stay open.
@Override
protected void onNewIntent(Intent intent) {
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
String query = intent.getStringExtra(SearchManager.QUERY);
Toast.makeText(this, "TRY TO PLACE QUERY IN QSB: " + query, Toast.LENGTH_LONG).show();
SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE);
searchManager.startSearch(query, true, this.getComponentName(), b, false);
}
}