WEBVTT

00:00.350 --> 00:07.010
In this video, we'll learn how to load the layout files and what are the different types of layouts

00:07.010 --> 00:09.670
in Android when you compile your app?

00:09.680 --> 00:13.970
Each XML layout file is compiled into a view a resource.

00:13.970 --> 00:18.950
You should load the layout resource from your app code in your activity.

00:18.980 --> 00:21.290
Dot Oncreate Callback implementation.

00:21.290 --> 00:30.440
For example, if we take this Java code, the Oncreate method and the Setcontentview will load the layout

00:30.440 --> 00:31.070
resource.

00:31.070 --> 00:35.870
So my layout is called main underscore layout.

00:35.900 --> 00:39.170
I'm passing the reference to it.

00:39.500 --> 00:47.690
Dot layout dot main underscore layout to the parameter of the set content view and the Oncreate method

00:47.690 --> 00:54.560
is a method that it is called by the Android framework when your activity is launched.

00:54.590 --> 00:57.950
Let's learn about the different types of layouts in Android.

00:57.980 --> 01:05.510
There are several types of layout available in Android studio, each catering to different design needs

01:05.540 --> 01:06.860
linear layout.

01:06.860 --> 01:14.810
This layout arranges its child views in a linear fashion, either horizontally or vertically.

01:14.810 --> 01:23.120
It's often used for creating simple lists, rows or columns of elements, relative layout.

01:23.150 --> 01:30.590
This layout allows you to position child views relative to one another or to the parent layout.

01:30.590 --> 01:36.350
It offers more flexibility in arranging elements compared to linear layout.

01:36.350 --> 01:44.360
Constraint layout constraint Layout is a powerful layout that allows you to create complex and responsive

01:44.390 --> 01:45.740
UI designs.

01:45.740 --> 01:54.500
It uses a system of constraints to define the position and alignment of views relative to each other.

01:54.500 --> 02:00.750
In the next video, we'll learn deeply about the linear layout, relative layout and constraint layout.

02:00.750 --> 02:07.350
Also, there are a lot of layouts such as the frame layout, the grid layout, table, scroll, view

02:07.350 --> 02:08.220
and viewpager.

02:08.220 --> 02:14.370
Later on we'll talk about these in different sections and different applications.
