How do I implement onSearchRequested in activity started by startActivityForResult
I need to pick a contact number to populate a number field in my main activity. I start another activity displaying a list of contact numbers using,
Intent contactPickerIntent = new Intent(Intent.ACTION_PICK,ContactsContract.CommonDataKinds.Phone.CONTENT_URI); startActivityForResult(contactPickerIntent, PICK_CONTACT_REQUEST);
I have the onActivityResult()
method to parse the results. The problem is impleme开发者_如何学JAVAnting a search method to search the list of contact numbers. I tried to use onSearchRequested()
but this works for the Main activity.
Any idea on how do I implement onSearchRequested()
for the activity spawned by thecontactPickerIntent
Intent.
精彩评论