Fundamental UI Design
Fundamental UI Design
Every item in a user interface is a sub class of the android view class which is present inside the
package Android.View. Android SDK provides a set of predefined views that can be used to built user
interface. Examples include items such as Buttons, ImageButtons, CheckBox, ProgressBar and
TextView classes.
Views
It is the base class for all visual interface elements commonly known as Controls or Widgets. All user
interface UI controls, including the layout classes are derived from View. It is an object/widget which
draws something on the screen by the help of user interaction. Examples of widgets are Buttons,
TextBox, Labels etc.
ViewGroups
They are extensions of the View class that can contain multiple child views. They are also extended
to provide the layout managers that help us to control layout within our activities. It provides the
layout in which we can order the appearance and sequence of views. Examples of ViewGroups are
FrameLayout, LinearLayout etc.
Fragments
It is used to encapsulate portions of your UI. It is useful when there is a need for optimizing different
screen sizes and creating reusable user interface elements. It is similar to UI View Controllers in
iPhone development.
Activities
It represent a single screen that the user interacts. It is equivalent to the forms in traditional
windows environment. To display a UI, we usually assign a View (layout or fragment) to an activity.