Pausing and resuming child activities in an ActivityGroup

I am making my first attempt at creating a custom ActivityGroup. Everything works for me, except for the activity lifecycle methods for child actions of groups. How can I call the onResume / onPause methods in my child actions when entering / leaving focus?

I know that tabActivity does this, but I cannot find how to view the code.

Thanks in advance!

+7
source share
1 answer

I had a similar problem. I think this is due to the way the history is stored in the group group. if you save the views in an arraylist, then onresume / onpause is not always called. I solved this using this implementation instead, which stores the activity identifier in the arraylist instead of the views, and I found that onresume and onpause were called.

http://ericharlow.blogspot.com/2010/09/experience-multiple-android-activities.html

0
source

All Articles