[android-developers] Re: Activity lifecycle: invoking finish

2011-06-05 Thread albnok
If you've noticed, cleaning stuff up let's say clearing a bitmap or
nulling an image before you call another activity will result in a
temporary blanking out. So onDestroy has to happen after the next
activity is fully drawn. If you use 14mb in Activity A and 14mb in
Activity B on a 16mb heap device you will run out of memory. I use
android:process in the manifest to get around this.


On May 11, 11:12 pm, Vikram vikram.bodiche...@gmail.com wrote:
 This seems to be the order.

 B.onPause() - A.onStart() - A.onResume() -B.onStop() -

 B.onDestroy().

 which makes sense!

 On May 12, 10:43 am, Vikram vikram.bodiche...@gmail.com wrote:







  I have two activities A and B. A is in the stopped mode and B is
  running. When I invoke finish() on B, A.onStart() and A.onResume() are
  being invoked before B.onStop() and B.onDestroy().

  Is this normal behavior? I find this a little strange! I want to
  cleanup stuff before I hand over control to B.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Activity lifecycle: invoking finish

2011-05-11 Thread Vikram
This seems to be the order.

B.onPause() - A.onStart() - A.onResume() -B.onStop() -
B.onDestroy().

which makes sense!

On May 12, 10:43 am, Vikram vikram.bodiche...@gmail.com wrote:
 I have two activities A and B. A is in the stopped mode and B is
 running. When I invoke finish() on B, A.onStart() and A.onResume() are
 being invoked before B.onStop() and B.onDestroy().

 Is this normal behavior? I find this a little strange! I want to
 cleanup stuff before I hand over control to B.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Activity lifecycle: invoking finish

2011-05-11 Thread dnkoutso
If I remember correctly you can use onPause() on activity B that will block 
before any callback occurs on activity A.

Beware though, not to do any long running operation in onPause() as it would 
stall the app.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en