I'm not positive about this, but I have never run into any issues doing it the following way: In any method that runs when something starts [ie: onCreate, onResume], I call through to super FIRST, allowing the system to start up whatever it needs to before I do anything. On methods that run when it closes [ie: onPause] I call through to super AFTER all my closing logic. This way just makes sense to me... Maybe someone with more technical knowledge could explain this more accurately :)
-Nick On Mar 31, 2:49 am, HippoMan <[email protected]> wrote: > In general, does it matter in an Activity if I put the call to > super.onResume() at the beginning or the end of my own onResume() > method? > > In other words, I can do this ... > > @Override > public void onResume() { > super.onResume(); > // do my stuff > > } > > ... or this ... > > @Override > public void onResume() { > // do my stuff > super.onResume(); > > } > > Does it matter which one I choose? And if so, why? > > Obvously, this probably depends on what "do my stuff" actually > entails. However, I'm looking for an explanation of what > super.onResume() actually does, so I can make an intelligent decision > as to where is the best place to put it in my own onResume method. > > I guess the same question would also apply to the position of > super.onPause(), super.onStart(), super.onRestart(), etc., in the > appropriate method calls, but let's at least start this discussion > with super.onResume(). > > Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

