[android-developers] Re: How to hide activity on BACK key without onDestroy?
You need to re-read the life-cycle documentation. After pressing [home] your app may be killed at any time, it just hasn't been killed yet. If you need a background process read up on services. -- RichardC On Oct 28, 7:26 am, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: When user presses BACK key, my activity's onDestroy is called and then it is killed. Is there a way (by overridding Activity.onKeyDown??) to simply put the activity into background without killing it? I want the BACK key to act like the HOME key (which doesn't kill my app), except I want to show the activity immediately below my activity. Thanks! --~--~-~--~~~---~--~~ 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: How to hide activity on BACK key without onDestroy?
I can handle may be killed. I just don't want killed for sure. Anyone got an answer for this? On Oct 28, 12:37 am, RichardC richard.crit...@googlemail.com wrote: You need to re-read the life-cycle documentation. After pressing [home] your app may be killed at any time, it just hasn't been killed yet. If you need a background process read up on services. -- RichardC On Oct 28, 7:26 am, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: When user presses BACK key, my activity's onDestroy is called and then it is killed. Is there a way (by overridding Activity.onKeyDown??) to simply put the activity into background without killing it? I want the BACK key to act like the HOME key (which doesn't kill my app), except I want to show the activity immediately below my activity. Thanks!- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: How to hide activity on BACK key without onDestroy?
If you think how to get around application lifecycle, then you project design is TOTALLY BAD. Really. Redesign project. On 28 Paź, 08:26, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: When user presses BACK key, my activity's onDestroy is called and then it is killed. Is there a way (by overridding Activity.onKeyDown??) to simply put the activity into background without killing it? I want the BACK key to act like the HOME key (which doesn't kill my app), except I want to show the activity immediately below my activity. Thanks! --~--~-~--~~~---~--~~ 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: How to hide activity on BACK key without onDestroy?
I agree with Piotr. Tomei, We may be able to help you with the *how*, if you told us *what* you are trying to accomplish. I am almost 100% it could be done without trying to circumvent Android's lifecycle management. On Oct 28, 4:42 am, Piotr piotr.zag...@gmail.com wrote: If you think how to get around application lifecycle, then you project design is TOTALLY BAD. Really. Redesign project. On 28 Paź, 08:26, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: When user presses BACK key, my activity's onDestroy is called and then it is killed. Is there a way (by overridding Activity.onKeyDown??) to simply put the activity into background without killing it? I want the BACK key to act like the HOME key (which doesn't kill my app), except I want to show the activity immediately below my activity. Thanks!- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: How to hide activity on BACK key without onDestroy?
My activities's first screen shows a bunch of images. When I hit HOME and then launch the app again, my app's first screen is displayed instaneously. You are not launching the app in this case. Pressing HOME is roughly equivalent to minimizing a window in a windowed operating system. Choosing the app again from the home screen is roughly equivalent to restoring the window from the minimized state. In other words, your app is still running after pressing HOME, at least until Android needs to reclaim memory. If I hit BACK and launch the app again, the images are decoded again and it takes about 200ms to show. Is there anyway to reduce this 200ms time? Use fewer images, or lower-resolution images, or images of a file type that decodes faster. I have not run performance tests on PNG vs. JPEG vs. GIF to determine which will decode quickest for the same source image, but it is possible that one format is significantly faster than the others. Or, stagger the image loads so the user gets to the activity faster, with the remaining images popping in as they decode. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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: How to hide activity on BACK key without onDestroy?
My activities's first screen shows a bunch of images. When I hit HOME and then launch the app again, my app's first screen is displayed instaneously. If I hit BACK and launch the app again, the images are decoded again and it takes about 200ms to show. Is there anyway to reduce this 200ms time? On Oct 28, 7:26 am, Streets Of Boston flyingdutc...@gmail.com wrote: I agree with Piotr. Tomei, We may be able to help you with the *how*, if you told us *what* you are trying to accomplish. I am almost 100% it could be done without trying to circumvent Android's lifecycle management. On Oct 28, 4:42 am, Piotr piotr.zag...@gmail.com wrote: If you think how to get around application lifecycle, then you project design is TOTALLY BAD. Really. Redesign project. On 28 Paź, 08:26, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: When user presses BACK key, my activity's onDestroy is called and then it is killed. Is there a way (by overridding Activity.onKeyDown??) to simply put the activity into background without killing it? I want the BACK key to act like the HOME key (which doesn't kill my app), except I want to show the activity immediately below my activity. Thanks!- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---