Android UI Tutorial - Android Views and ViewGroups

The basic unit of an Android application is an activity.

An activity by itself does not have a presence on the screen. Instead, it has to draw the screen using Views and ViewGroups.

A view is a widget that has an appearance on screen. Examples of views are buttons, labels, and textboxes. A view derives from the base class android.view.View.

One or more views can be grouped together into a ViewGroup. A ViewGroup, which is itself a special type of view, provides the layout in which you can order the appearance and sequence of views.

Examples of ViewGroups include LinearLayout and FrameLayout. A ViewGroup derives from the base class android.view.ViewGroup.

Android supports the following ViewGroups:

  • LinearLayout
  • AbsoluteLayout
  • TableLayout
  • RelativeLayout
  • FrameLayout
  • ScrollView