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!

Emil Sjölander
  • 1,773
  • 4
  • 19
  • 27
  • 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. –  Aug 10 '11 at 18:17

1 Answers1

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

Kevin Qiu
  • 1,616
  • 1
  • 13
  • 15