O'Reilly logo

Mobile DevOps by Jhalak Modi, Rohin Tak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Methods in the Activity class

  • 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required