Basic Android User Interface Components: 2.1. Activity
Basic Android User Interface Components: 2.1. Activity
2.1. Activity
An Activity represents the visual representation of an Android application. Activities use Views and Fragments to create the user interface and to interact with the user.
2.2. Fragments
Fragments are components which run in the context of an Activity. Fragment components encapsulate application code so that it is easier to reuse it and to support different sized devices.
Fragments are optional, you can use Views and ViewGroups directly in an Activity but in professional applications you always use them to allow the reuse of your user interface components on different sized devices.
3.1. Intents
Intents are asynchronous messages which allow the application to request functionality from other components of the Android system, e.g. from Services or Activities. An application can call a component directly (explicit Intent) or ask the Android system to evaluate registered components based on the Intent data (implicit Intents ). For example the application could implement sharing of data via an Intent and all components which allow sharing of data would be available for the user to select. Applications register themselves to an Intent via an IntentFilter.