pedja
pedja

Reputation: 3413

Pass additional data to SearchActivity with SearchView

When submitting search query to SearchActivity I need to also pass additional String

How can I do this?

Upvotes: 1

Views: 656

Answers (1)

pedja
pedja

Reputation: 3413

SOLVED

I used normal intents to send both query and additional string

 @Override
 public boolean onQueryTextSubmit(String query) 
     {
     Intent intent = new Intent(Activity.this, SearchResults.class);
     intent.putExtra("query", query);
     intent.putExtra("listName", listName);
     startActivity(intent);
 return true;
 }

Upvotes: 4

Related Questions