[mono-android] Help with Activity.Finish

Jonathan Pryor jonp at xamarin.com
Tue Jan 3 14:32:19 EST 2012


On Dec 30, 2011, at 12:41 AM, NebulaSleuth wrote:
> I have an Activity that starts a second activity using StartActivityForResult().
> 
> The second activity starts fine, and then spawns a thread to do some work.

This seems like a very strange design. Activities are for the user, e.g. if you wanted the user to select an image for posting, you'd use StartActivityForResult() and the launched activity would allow the user to select an image. I'm not sure why a thread would be necessary, unless it's similar to Wally's recent "Why do I NOT need RunOnUiThread?" thread and the new activity is using a thread to do work and update a ProgressBar in the UI...

Regardless, the expectation is that the started activity will remain "topmost" until the user dismisses the dialog or the Activity calls Activity.Finish().

Seeing your "child" activity code might be useful to see why you're seeing what you're seeing.

 - Jon



More information about the Monodroid mailing list