My application shall work the following way:
- Activity #1 contains a text field (
EditText) and a button. - If the user clicks the button a search dialog is opened via
onSearchRequested(). - This calls the searchable activity #2 which extends
ListActivity. It provides a list of items viasetListAdapter(). - If the user clicks on a list item activity #2 shall pass the selected item’s text back to activity #1 and display it in the text field.
Bullets #1-3 are clear and working. However I don’t have any idea how to implement #4. I know about the possibility to use intents but it doesn’t work if I use an intent after onSearchRequested().
Thanks,
Robert
The following solution is working fine for me:
http://blog.dpdearing.com/2011/05/getting-android-to-call-onactivityresult-after-onsearchrequested/