Is there a setText() method for SearchView or something like that? I try to set the search text in the searchView like this but there is no method for like this.
<
If you want the searchView to expand and it can be shrink back to an icon after the user tap x (close), the way is:
searchView.isIconified = false // Expand it
searchView.setQuery("your text here", false) // true if you want to submit, otherwise false
searchView.clearFocus() // so the keyboard is not show up.
NOTE: If you expand it using:
searchView.onActionViewExpanded()
searchView will not shrink back after user tap x (close)