On Sun, Aug 1, 2010 at 4:15 AM, Brian <aerodr...@gmail.com> wrote:
> I didn't really get your question, but if your asking whether to place
> the "super.onCreate();" before or after the onCreate method, it's
> suppose to go at the beginning. I'm pretty sure by the rules of Java,
> the super (aka it's constructor) will need to be executed first before
> any other code. Hope this answered your question!

Technically, onCreate() is not the constructor. There's nothing in
Java that forces you to have super.onCreate() at the beginning. I tend
to put super.onCreate() first, because I do not know what in Android
might depend on that (e.g., does setContentView() work if you have not
called super.onCreate()?).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 2.2 Programming Books: http://commonsware.com/books

-- 
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

Reply via email to