Skip to main content

Android Online Training | the Concept of Android Activities

Android - Activities. An activity represents a single screen with a user interface just like window or frame of Java. Android activity is the subclass of ContextThemeWrapper class. The Activity class defines the following call backs i.e. events. Learn Android from certified experts by Learn IT Training see Android training for details.
The concept of Activities
The activity class serves as the entry point for an app’s interaction with the user, providing the window in which the app draws its UI. This window typically fills the screen, but may be smaller than the screen and float on top of other windows. You implement an activity as a subclass of the Activity class. Generally, one activity implements one screen in an app. For instance, one of an app’s activities may implement the Preferences screen, while another activity implements the Compose Email screen.
Most apps contain multiple screens, which means they comprise multiple activities. Typically, one activity in an app is specified as the main activity, which is the first screen to appear when the user launches the app. Each activity can then start another activity in order to perform different actions. For example, the main activity in a simple e-mail app may provide the screen that shows an e-mail inbox. From there, the main activity might launch other activities that provide screens for tasks like writing e-mails and opening individual e-mails.
Although activities work together to form a cohesive user experience in an app, each activity is only loosely bound to the other activities; there are usually minimal dependencies among the activities in an app. In fact, activities often start up activities belonging to other apps. For example, a browser app might launch the Share activity of a social-media app.
To use activities in your app, you must register information about them in the app’s manifest, and you must manage activity lifecycles appropriately. The rest of this document introduces these subjects.

If you have worked with C, C++ or Java programming language (JAVA training by experts makes you to become professional in programming) then you must have seen that your program starts from main() function. Very similar way, Android system initiates its program within an Activity starting with a call on onCreate() callback method. There is a sequence of callback methods that start up an activity and a sequence of callback methods that tear down an activity as shown in the Activity life cycle diagram.
The Activity class defines the following call backs i.e. events. You don't need to implement all the callbacks methods. However, it's important that you understand each one and implement those that ensure your app behaves the way users expect.

Want to learn and excel in android join Learn IT Training. Developing Android Apps is the foundation of our advanced Android curriculum. Online course by Learn IT Training blends you theoretically and practically to build great apps the right way. We take you through the basics and moves on to advanced concepts in Android app development providing online classes with highly qualified professional trainers and will assist while attending the interviews even after completion of course.
Want to take a free demo to register CLICK HERE
For more details visit:
Email: contact@learnittraining.com
Phone: INDIA +91 9912989639, USA +12108585008

Comments