Hello i am using android 3.0 search widget(not the search mode), the problem is i need to pass some parameters along with the search word.
Android i
when querying by searchview ( searchable || searchview widget ) you can pass parameter to searchActivity ( searchResultActivity ) by define your own OnQueryTextListener like this.
searchView.setOnQueryTextListener(new OnQueryTextListener() {
@Override
public boolean onQueryTextChange(String arg0) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean onQueryTextSubmit(String query) {
Intent searchIntent = new Intent(getApplicationContext(), SearchResultsActivity.class);
searchIntent.putExtra(SearchManager.QUERY, query);
searchIntent.setAction(Intent.ACTION_SEARCH);
startActivity(searchIntent);
return true;
}
});