O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

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

The Activity Class

The Activity class is designed to handle a single task that the user can perform. Activities almost always have a visible component that allows the user to interact with the activity to perform the task. The Activity class is not directly instantiated in an Android app. Rather, it is subclassed for every activity that the user needs to perform in the app. These subclasses are stored as .java files in the app project’s src folder. This allows developers to inherit all the functionality of the Activity class and add their own unique functionality through Java code. One of the most important inherited functions of the Activity class is the capability to respond to life cycle events such as onCreate and onPause (refer to Chapter ...

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