Using the super.onSearchRequested () function, I can open the search dialog in my Android application, what is the equivalent function to close it?
The search dialog closes with setOnDismissListener() and / or setOnCancelListener() .
setOnDismissListener()
setOnCancelListener()
See http://developer.android.com/reference/android/app/SearchManager.html#stopSearch ().
That should do it ...
import android.app.SearchManager; ((SearchManager)this.getSystemService(Context.SEARCH_SERVICE)).stopSearch();
Can't hide this line using ICS using this method?