Saturday, 15 May 2010

onCreate() method

  • Operating system calls onCreate() method (in c language, main() is called).

public class MainActivity extends
public void onCreate(Bundle savedInstanceState)
  //call the super class method
 //specify the xml file
}//end of onCreate()

Q: What is Bundle? 
Ans: Bundle is a predefined class, it specifies the state of the activity.

Q: What is  savedInstanceState?
Ans: It is just varialbe (reference), we can give any name instead of savedInstanceState

No comments:

Post a Comment