Home Page
About Us


OnCreate refers to one of the lifecycle methods for several components on the Android platform.


An Android method for *explicitly* setting the `Activity` content `View`.



If you use startactivity in the new activity s oncreate you will also set the contentview;so with respect to time setcontentview alone is faster since it doesn t start a new activity

from question  

SetContentView(R.Layout.main) vs startActivity(intent), which is more common?

Activities are run in order of the android lifecycle so oncreate is not called first;it is just the first opportunity you have to call setcontentview to inflate your layout

from question  

Does Android start on AndroidManifest.xml or on the onCreate ()method?

I can make this happen with the minimal project where oncreate does nothing more than call super and setcontentview

from question  

How to get testDevice ID for Android AdMob ads

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0