Android Components



 


The followings gives a short overview of important Android components.


Activity  


Activity represents the presentation layer of an Android application. A simplified description is that an Activity is a a screen. This is slightly incorrect as Activity can be displayed as dialogs or transparent. An Android application can have several Activities


 Views and views group


Views are user interface widgets, e.g. buttons or text fields. The base class for all View is


android.view.View. Views often have attributes which can be used to change their appearance and behavior.


A ViewGroup is responsible for arranging other View e.g. they are layout manager. The base class for a layout manager is android.view.ViewGroups. ViewGroup also extends View. ViewGroups can be nestled to create complex layouts. You should not nestle ViewGroups too deeply as this has a negative impact on performance.


Intents


Intents are asynchronous messages which allow the application to request functionality from other components of the Android system. An application can call a component directly or ask the Android system to evaluate registered components for a certain Intents.  Applications register themselves to an intent via an IntentFilter. Intents allow combining loosely coupled components to perform certain tasks.


Services


Services perform background tasks without providing an UI. They can notify the user via the notification framework in Android.


ContentProvider


ContentProvider provides an structured interface to data. Via a ContentProvider your application can share data with other applications. Android contains an SQLite database which is frequently used in conjunction with a ContentProvider to persists the data of the ContentProvider.


BroadcastReceiver


BroadcastReceiver can be registered to receives system messages and Intents. BroadcastReceiver will get notified by the Android system if the specified situation happens.


 Widgets


Widgets are interactive components which are primary used on the Android homescreen. They typically display some kind of data and allow the user to perform actions via them. For example a Widget could display a short summary of new emails and if the user select a email it could start the email application with the selected email.


Others


Android provide much more components but the list above describes the most important ones. Other Android components are \"Live Folders\" and \"Live Wallpapers\". Live Folders display data on the homescreen without launching the corresponding application.

Editor: ankita Added on: 2013-02-28 17:27:18 Total View:365







Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---