- In an Android application, a View is one of the basic ingredients for the GUI. A View represents a single part of a screen displayed to users. Views are combined within hierarchical structures along with other Android user interface elements, such as widgets and layouts. In its most basic sense, a View is a rectangular area within a screen for an Android app. View Groups are also integral to Android GUI development, as these provide the basis for implementing layouts, through which the various visual elements in an application interface are arranged and presented to users.
- The Android platform provides developers with a range of ready-made user interface elements for use within applications. Developers can use these freely, providing standard appearance and behavior without having to implement the details. Android widgets include various user controls, such as text fields, buttons, lists and check boxes. If a developer does not want to use the standard Android widget components, he can optionally create his own custom user interface elements, which can be based on, or extend, the existing elements in terms of both appearance and behavior.
- Android application Layouts determine the ways in which visual interface items appear relative to one another. Developers can define Layouts for the screens in their applications using XML or within the application's Java programming code. Android Layouts include linear, tabular and relative arrangements. Within the Layout XML for an application interface, developers can also dictate positioning, padding, size and margins for particular visual items. Within the Eclipse Integrated Development Environment (IDE) with the Android Development Tools (ADT) installed, developers can see the effects of their Layout designs on virtual devices.
- As well as defining appearance for Android GUI elements, developers need to determine what processing should take place when the user interacts with the elements. A user event is what arises when this happens. Android programs can tailor what happens when these events occur, using Event Listeners. Event Listeners can detect user interaction, such as clicking, long clicking, touching and pressing keys. Android developers can create Event Handlers, which are functions called when these user events occur, allowing an application to respond to user interaction by carrying out application tasks.