- OnCreate(): When a user clicks on the app icon to start the application, this method is called. This method is used to perform some initial setup that might be required for the activity, for example, creating views, initializing variables, and much more:
Let's have a look at our application code where we used the OnCreate() method to do some initialization and setup:
The things we are doing in our OnCreate() method are:
-
- Setting up a layout for the view
- Initializing variables to get references to TextInput ...