I have a ListActivity I display from a parent activity. When the user
selects the desired item from the list it supposed to return to the
parent activity. Only when I call finish, the app goes away (doesn't
quit) and displays the Android Home page. If I debug, the application
doesn't die, it just sits on an MessageQueue.Wait().
I have a break point right before the finish() call and one in the
first line of the OnActivityResult. When I press continue from the
first, I never see the second on in onActivityResult.
I have other child activities in my app that don't display this
problem. However this is the only ListActivity I have that I am
trying to return from.
I do call finish from onListItemClick. I'm wondering if that is not
allowed since that is responding to a view event. However if I don't
do it here, how can I get back to the parent activity. Below is the
code snippet of my finish method.
@Override
protected void onListItemClick(ListView l, View v, int position,
long id)
{
Object selectedItem = _adapter.getItem(position);
//TODO get results back to parent activity
Intent listIntent = new Intent();
setResult(RESULT_OK, listIntent);
finish();
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en