1. ANDROID DEVELOPMENT COURSE
BEGINNER TO EXPERT GUARANTEED
ACCESS OTHER COURSE PLAYLIST LINKIN DESCRIPTION
SUBSCRIBE!!!
#7 Layouts in Android Linear, Relative & Constraint
2. The basic building block for user
interface is a View object which is
created from the View class and
occupies a rectangular area on the
screen and is responsible for drawing
and event handling. View is the base
class for widgets, which are used to
create interactive UI components like
buttons, text fields, etc.
What is View?
3. The ViewGroup is a subclass of View and
provides invisible container that hold other
Views or other ViewGroups and define
their layout properties.
At third level we have different layouts
which are subclasses of ViewGroup class
and a typical layout defines the visual
structure for an Android user interface
What is Viewgroup?
6. LAYOUTS IN
ANDROID
5 Basic Layouts in Android
1) Constraint Layout
2) Linear Layout
3) Relative Layout
4) Absolute Layout
5) Frame Layout
7. Constraint layout
What is Layout?
Constraint Layout is a ViewGroup. which allows you to create large and complex layouts with
a flat view hierarchy, and also allows you to position and size widgets in a very flexible way.
8. Linear layout
What is Layout?
Android Linear Layout is a view group that aligns all children in either vertically or horizontally.
9. Relative layout
What is Layout?
Android Relative Layout enables you to specify how child views are positioned relative to each
other. The position of each view can be specified as relative to sibling elements or relative to
the parent.
10. Absolute layout
What is Layout?
An Absolute Layout lets you specify exact locations (x/y coordinates) of its children. Absolute
layouts are less flexible and harder to maintain than other types of layouts without absolute
positioning.
11. Frame layout
What is Layout?
Frame Layout is designed to block out an area on the screen to display a single item. It should
be used to hold a single child view, because it can be difficult to organize child views in a way
that's scalable to different screen sizes without the children overlapping each other.