On Sun, Aug 15, 2010 at 6:13 PM, Filip Havlicek <[email protected]> wrote: > thanks for your swift reply. I thought my AsyncTask got destroyed somehow, > but from your response it seems like just my ProgressDialog got dismissed. > Is there a way I can prevent that?
Prevent what? > I want the computation in AsyncTask to be > done before user can interact with the UI again. Personally, I would recommend you design a UI that works both with and without the results of the "computation". > And second question, can I override the back button somehow so I could catch > the call in my AsyncTask and cancel it? onBackPressed() (Android 2.x) and onKeyDown (Android 1.x) can be used to intercept the BACK button. That being said, you should consider whether you really should be implementing onPause() or onStop() instead, since there are more scenarios than merely the BACK button (e.g., HOME button). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- 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

