Friday 22 July 2011

onActivityResult

If you want to launch a new activity from an activity the startActivity() works. If you want to return a result from the second activity then startActivityForResult() also works. The result is passed back in an intent which is read by overriding onActivityResult in the first activity. Once again that seems to work.

However, if I want to use the returned info to update a textview (or an editview) it does not change. I have used .invalidate() to force a redraw, but still nothing changes. I have checked the returned info by writing a log entry and by displaying a toast, both show the data has changed, but the display doesn't change. I have no ideas why. I have wasted a couple of hours on this, so I give up.

No comments:

Post a Comment

Thank you for taking the time to add a comment.

I have decided, regrettably, to review comments before they are published to ensure that offensive or inappropriate comments do not get shown.

Genuine comments are always welcome and will be published as quickly as possible.