pausing and resuming child activities in ActivityGroup
Asked Answered
C

1

7

I am making a first try att creating a custom ActivityGroup. I am getting everything working except the activity lifecycle methods of the groups child activities. How can i call the onResume/onPause methods in my child activities when they enter/exit focus?

I know the tabActivity does this but i cannot find how when looking through the code.

Thanks in advance!

Commerce answered 2/7, 2011 at 20:59 Comment(1)
I am facing the same problem. I have an ActivityGroup where I spawn the child activities, but my onPause/onResume are not called when I press the back button.Greyback
G
0

i had a similar problem. I think it has to do with how the activitygroup stores history. if you store the views in the arraylist, then the onresume/onpause isn't always called. I solved it by using this implementation instead, which stores activity id's in the arraylist instead of views, and I found that the onresume and onpause were called.

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

Gabar answered 23/8, 2011 at 18:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.