View Single Post
  #3 (permalink)  
Old December 31st, 2008, 03:37 AM
Reto's Avatar
Reto Reto is offline
Wrox Author
Points: 287, Level: 5
Points: 287, Level: 5 Points: 287, Level: 5 Points: 287, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2008
Location: London, United Kingdom
Posts: 61
Thanks: 1
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by SteveOliverC View Post
My question is, Where is onCreate that we are overriding? and why do we need to do this (was this supposed to be included in page 40)?
Apologies! Yes, it looks like the super.onCreate(icicle) line somehow got dropped from the text on page 40 -- you always need to call super.OnCreate when overriding the onCreate method of an Activity. It should be the first thing called in the overriding method.

The correct technique for overriding onCreate is shown on page 66, or as you point out, in the downloadable code samples.

Sorry again for the confusion, not sure how that snuck through.
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
Reply With Quote
The Following User Says Thank You to Reto For This Useful Post:
SteveOliverC (December 31st, 2008)