In this video, we'll learn how to load the layout files and what are the different types of layouts
in Android when you compile your app?
Each XML layout file is compiled into a view a resource.
You should load the layout resource from your app code in your activity.
Dot Oncreate Callback implementation.
For example, if we take this Java code, the Oncreate method and the Setcontentview will load the layout
resource.
So my layout is called main underscore layout.
I'm passing the reference to it.
Dot layout dot main underscore layout to the parameter of the set content view and the Oncreate method
is a method that it is called by the Android framework when your activity is launched.
Let's learn about the different types of layouts in Android.
There are several types of layout available in Android studio, each catering to different design needs
linear layout.
This layout arranges its child views in a linear fashion, either horizontally or vertically.
It's often used for creating simple lists, rows or columns of elements, relative layout.
This layout allows you to position child views relative to one another or to the parent layout.
It offers more flexibility in arranging elements compared to linear layout.
Constraint layout constraint Layout is a powerful layout that allows you to create complex and responsive
UI designs.
It uses a system of constraints to define the position and alignment of views relative to each other.
In the next video, we'll learn deeply about the linear layout, relative layout and constraint layout.
Also, there are a lot of layouts such as the frame layout, the grid layout, table, scroll, view
and viewpager.
Later on we'll talk about these in different sections and different applications.