So now let's actually click on this text tab here at the bottom.
And now as you can see here we have this relatively out here.
OK.
So now let's change this relatively out to linear layout.
So here just click on this preview here at the right hand side as you can see we have this preview option.
Just click on it.
Now we can actually see our user interface and now this actually zoom into this user interface here
by just click on this the zoom button here.
And now I can see this User Interface he had better.
Right.
So let's actually make this area wider.
So here we can see our user interface.
Ok so now we have this relatively out.
So let's actually change this relatively to linearly out.
And now we have a linear layout.
So here let's actually specified that the orientation of this linearly out here.
So just add another attribute to this linearly out here.
So here before the end in tact of this linearly out here as you can see now I want to add another attribute
orientation.
So just type in here orientation.
And as you can see here the autocomplete feature of Android studio is helping me to choose this attribute
orientation data selected by person by pressing on there or on the Enter key on your keyboard.
And here we have two options.
We can say that this linear layout is actually a horizontal linearly out or we can say that this linearly
out is actually a vertical linear layout.
So in this case if you want to use a vertical linearly out for the roots of our activity here.
So just select this vertical here and then press an interview on your keyboard.
And now let's ask you to go inside this linearly out here as you can see now we are inside this linear
lift.
This is the beginning tag as you can see here where we actually specify the attributes of this linearly
out.
And this is the ending.
And this means that we can put some user interface components inside the linearly out.
So now I want to do that here.
So now let's actually make this area a little bit smaller and make this a little earlier a little bit
wider and now.
So now inside this linearly out vertical.
Let's create another linearly out.
But this time I want to create a linearly out horizontal.
So just put an opening tag here and just type in here linearly out.
And now just select here and select is linearly linearly.
And as you can see here the autocomplete feature of Android studio is helping me to actually specify
the layout and the layout height of my linearly out here.
OK these two attributes are necessary.
We need to specify a value for the layout with and for the layout height of are linearly out here as
you can see right.
So the layout is going to be for example match parent.
So for the layout with assigned a value match parent and for the layout height assigned the value or
add content.
OK.
Now as you can see here if I don't specify the art orientation attributes of this linearly or here the
default value is actually what exactly but for here.
Because I don't want to get you confused here I want to specify the orientation here so just type in
here orientation and choose horizontal here.
But again this orientation here as you can see it but by default is horizontal.
So if you don't specify the orientation of your linearly out here the default value is horizontal.
And now let's actually specify an ID for this linearly out here.
So just press on until your keyboard.
And here I can actually specify an ID for this linearly.
So here I can just type in ID.
And now I can actually select this id attribute.
And here again in order to specify an ID for my Alania lay out here I need to just type in here and
sign Plus Id slash.
And now for the idea I can just step in here first.
First row.
Linear layout.
So this is the ID of my Linnea lay out here.
Right.
First row linearly.
So this is going to be our role here that we can actually put two buttons inside it.
So now let me ask you to show you the actual application.
So as you can see here we have three rows here.
The first throw is this one that actually contains two buttons holes and Pinguin.
The second row is this one which actually contains two BOTTEN peacock and bird.
And the second row and the first row excuse me is this one as you can see here which contains these
two buttons.
And Dalfin right.
So now you are actually creating this row here that actually contains these two buttons.
Right.
So we have this linearly or horizontal as you can see here and in the as you can see in a preview here
at the right hand side.
So now as you can see if you actually click on this preview here now you can see that this area is actually
highlighted here right.
So now I want to actually add two buttons inside this linearly or what is horizontal.
So as you can see here I can actually go inside this linearly out here as you can see this is the beginning
tag and this is the ending tag.
Right.
So inside is linearly or horizontal.
I want to add two buttons.
So now inside is a horizontal linear play out here as you can see.
I'm going to actually pasting some lines of code here and then I'm going to explain to you what's going
on here.
So as you can see here these are two lines of code that I pasted here.
So in the right hand right inside this preview we can see that we added two buttons into this.
The linear layout horizontal right.
We have this button here and we have this button.
So now let's actually look at our coats here.
As you can see these are the lines of code that I pasted here.
And as you can see we have this button here.
Right.
And the layout of it is zero DPI as you can see here the layout height is that content and I actually
assigned a value for the layout weight attribute which is actually 0.5.
And this means that because I actually assign the value 0 the P to that layout of this button here.
Now I assigned the values 0.5 to the lay out what the weight of this button and this means that it's
going to actually take a half of the Vee's of its patent which is actually linearly out horizontal here
right.
This button here is going to actually take a half of the V of its patent which is this linearly out
horizontal.
And as you can see here we have these attribute lines too.
OK.
And this means that we can actually add two lines of text to this button here.
OK so for example we have a long test text here.
Here we are specified the number of lines.
And here it's going to actually put that line text here in two lines.
OK.
So that's the attribute that you can actually specify here.
And for the out margin as you can see here I assigned the value 5 DP.
So as you can see here I specify the lay margin for each direction left top right and bottom which is
actually 5 DP.
OK.
So now as you can see here we have this button again to lay out which is zero DP.
The layout height is the content and the layout weight is zero DP So it's going to actually take a half
of the width of its Pallant which is this linearly out horizontal.
And again for the lines attribute I assigned de-valued number two and this means that this button here
is going to actually accept two lines of text and we have this play out.
Margene.
And as you can see here for each direction left top right and bottom we have five DP Margene.
OK.
The external actually then is around this button here is that left margin attribute.
So hopefully that makes sense.
And this is our linear layout horizontal that actually contains these two buttons right.
So now after the ending Tyche of this linearly horizontal here as you can see now I'm going to actually
create another linearly or horizontal.
Right.
So I just need to put an opening tag here so linearly out as you can see here.
And for the layout of it I can assign the value.
For example a match parent and for the lay out height I can assign the value of content.
So content and now we can actually specify other attributes.
So I can actually specify the orientation which is horizontal and the idea is going to be a second row
linearly out as you can see here.
Right.
This first linearly out is first row linearly as you can see here.
And if you have another linearly out here as you can see second row linear layout.
And as you can see here we have an error and that's because if you want to actually specify an I.D.
for your user interface component you need to frailest just type in here at sign Plus Id slash.
And then you can specify the name of the ID.
So now let's actually go inside this linearly out horizontal here and again I'm going to actually put
two buttons here inside is linearly out here.
So now if we actually show you the emulator here as you can see this is our emulator and this is our
application that is actually running on the simulator.
And if you have this section the here that contains these two buttons right this Picot and despair the
button.
So here we can actually put two buttons into this linearly out horizontal.
So this is our linearly or horizontal.
And now inside is linearly or horizontal I'm going to paste in some lines of code here and then I'm
going to explain to you what's going on here.
Exactly.