3.3.1. Class Activity

Unlike many Java apps, Android apps don’t have a main method. Instead, they have four types of executable components—activities, services, content providers and broadcast receivers. In this chapter, we’ll discuss activities, which are defined as subclasses of Activity (package android.app). Users interact with an Activity through views—that is, GUI components. Before Android 3.0, a separate Activity was typically associated with each screen of an app. As you’ll see, starting in Chapter 5, an Activity can manage multiple Fragments. On a phone, each Fragment typically occupies the entire screen and the Activity switches between the Fragments based on user interactions. On a tablet, activities often display multiple Fragments per screen to take better advantage of the larger screen size.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.23.79.149