- Android Development Tutorial
- Android Core Concepts
- Installing Android Studio
- Your First Android App
- Android Project Overview
- Android Activity
- Android View and ViewGroup
- Android Layout
- Android Fragment
- Android ActionBar
- Article TOC Test
- Android Toast
- Android TextView
- Android Buttons
- Android Web Apps Using Android WebView
Android View and ViewGroup
View class and
ViewGroup class are two very central classes in Android apps.
An Android app contains one or more activities. An Android activity is a screen, similar to windows in a desktop application.
Inside an activity you can have GUI components. The GUI components are instances of
subclasses. It may sound a bit abstract at this point, but I will explain both in more detail below.
View class is a superclass for all GUI components in Android. For instance, the
class which is used to display text labels in Android apps is a subclass of
Android contains the following commonly used
These are only some of the many, many subclasses of the
ViewGroup class is a subclass of the
work as containers for
View instances to group
View instances together. Android
contains the following commonly used
These are not the only
ViewGroup subclasses Android contains. There are others but which are less used.
ViewGroup subclasses listed above group
View instances together and takes care of
their layout. For instance, the
LinearLayout will render the components after each other either
horizontally or vertically.