Got a SearchView
(androidx, not support lib)
I have added its proper listeners like:
@Override
public boolean onQueryTextSubmit(String query) {
Toaster.show(this, "onQueryTextSubmit!");
return true;
}
@Override
public boolean onQueryTextChange(String query) {
Toaster.show(this, "onQueryTextChange!");
return true;
}
@Override
public boolean onClose() {
Toaster.show(this, "onClose!");
return true;
}
Both onQueryTextSubmit
and onQueryTextChange
works well. However, when I click on the small X on the right side of the SearchView
, the search view does get cleared, but the onClose
listener never runs.
In the official docs it says about setOnCloseListener the following:
"Sets a listener to inform when the user closes the SearchView."
I think I use this properly, yet it is not triggered.
Any ideas?