What is a OnCreate method in android

后端 未结 5 1964
北恋
北恋 2020-12-08 01:09

I am new to android trying to understand what the below method does

public void onCreate(Bundle savedInstanceState)
{
        super.onCreate(savedInstanceS         


        
5条回答
  •  萌比男神i
    2020-12-08 01:35

    Bundle is used to save & recover state information for your activity. In instances like orientation changes or killing of your app or any other scenario that leads to calling of onCreate() again, the savedInstanceState bundle can be used to reload the previous state information. Familiarity with this article about Activity lifecycle will help.

提交回复
热议问题