Hello this is Martez of course.
And in this story all let's change the Paglen color of our relatively Also inside this componentry section
description relatively out and inside these attributes here you can see that we have this icon view
all attributes and view.
Again if I click on it you can see this list attributes of view all attributes and search for the background
attributes.
So here for this.
Back in an attribute you can see this spot and you can see this from that spot.
If I hover over these attributes or just click on it and here this window is going to be orphant you
can see we have some Papiss click on color top.
And here we can change.
We can select a color.
So for example we can change click on color axent right.
If you want to you can change the color here or here it says add new resource right.
Just click on it and here just click on new color value and for example we can select a new color.
Here we have we have red color.
We have Hallward red light.
We can just choose this color and then click on OK.
So now the background color is changed.
So now let's add our linearly out horizontal into our little lives inside this palette section.
Click on layouts and just click on linearly or horizontal and just drag it here into our relatively
out OK.
So let's put it here and now are to select this linearly as horizontal.
Let's close this search and for the lay out of it.
Let's assign the value of content to this for the height assigned the value of content for this linearly
and horizontal.
OK.
Now literally out of with as much apparent.
So now let's add some buttons to our linearly as horizontal inside this palette section and all.
And at the bottom two are linearly at all isn't.
So here we have the spot and let's change the takes of this button to button one.
And the president of your keyboard.
And here you can see that the layout of our button is wrapped content.
Right.
But the layout weight is number one.
Just delete this number one and then present it to the key on your keyboard.
So I thought what about this.
Lay out great leader for now let's just click on this view all attributes in order to see list attributes
here.
Let's add another part into our linearly or horizontal and below this pattern here inside this componentry
section.
So just select a spot in change that takes up the spot into Potin to and delete the value of this play
out we lay out a wait actually.
And here you can see that the last bit which is rap content.
Let's add another button to this linearly horizontal inside this linearly horizontally so you can see
that these blue lines are actually guiding us that very we don't exactly put our patents or just put
it here and here at Selecta spotted for the text choose a button of free and then precedented on your
keyboard and the lay out weight should be nothing.
So here you can see that we have these buttons but it is these buttons are this organized.
I don't like how these buttons are actually organized.
So in order to solve this problem we need to assume just assume.
Imagine imagine that this linearly at horizontal is actually divided into three parts because we have
only five buttons free buttons right.
So if you imagine that only nearly horizontal is divided into three parts each button should take one
part.
OK the beat of each button should take one part of this linearly or horizontal.
We don't want to do anything with the height because the height is rock content but you want to solve
the problem of the beat.
So now here we are going to do.
So just select for example.
These buttons hold down inside this componentry section if you find two cities.
All of these patterns you can either hold down the Shift key and select all of them or you can't just
if you're using a Mac.
Just hold down the command key on your keyboard and select each of these buttons.
And if you're using Windows hold down the construction on your keyboard and track each of these buttons.
And here for the layout V we just assign the value zero here.
Because we assumed that our linearly as horizontal is divided into three free parts of our linearly
authority until it's divided into three parts and each part in it should take one part each part in
which should take one part of our linearly or horizontally.
So now we assign the value zero for the layout with our patterns.
Now we have this lay out weight attributes.
So I told you that we have three parts so each button should take one part and we assign the value.
Number one for the button for the Leanna's varied of each button in that holding area horizontally so
just as I did another one here and then press on on your keyboard.
So now you can see that our buttons are now completely organized inside Onelia horizontal.
So this is how you solve the problem of linearly outs in and right whether you want to specify the lay
out Viets or the outside this lay of weight is very usable.
OK so for example I imagine that might lay out linearly at present or is divided into three parts.
And I wanted that each button should take one part of that linearly out horizontal.
So I assign the values 0 to the layout of each bartend and is I assigned to lay out vate value.
Number one for that we have to wait up each button.
So now you can see that our linearly horizontal is actually divided into three parts and each part is
taken by each button here.
Right.
So you learn more about this later.
But here I just wanted to tell you that before we use the persons so we just said for example I said
that assume that this linearly or horizontal or this in the area vertical is for example Davidovits
or the height is for example 100 percent.
And for example we want our button all we want are text views to take for example a 20 percent or that
pattern to take 25 percent dispersants is not used anymore in Android studio and it can actually show
you a compiler error if you use percent for the base attributes of your for example but in all your
layouts.
So for example here we cannot say 50 percent is going to.
If you want to run your app can actually show you a compiler error for that here.
Here is the formula.
If you are using a linearly out for example a horizontal linearly or a vertical linearly out just as
soon or imagined that that's linearly out is actually divided into a number of parts.
It doesn't really matter.
It depends on your application and how you how many items you want to add into that specific linearly
out.
Just assume that it is.
Imagine it is divided into a number of parts and 40 lay out Viets or lay out height of your for example
of specific items.
Just assign the values here.
I just want to solve the problem of lay out.
So I assign the value 0 to the layout width of each button and here for example here I wanted to for
example my button each button to take each part to take one part.
So I assigned the value number one for the lay out weight of each button.
So here for example you may say that I want to assume or imagine that my linearly or horizontal is divided
into 10 parts.
Right.
You can imagine that you can imagine anything.
So now I am going to imagine that my linearly authorities aren't all is divided into 10 parts and one
of my Bettina's So for example Potten number three I want this patent to take eight parts.
So how you're going to solve this problem.
So in order to solve this problem so use it that we have put in number one but in two we have both in
the bottom three should take eight parts of the vse of the linearly out horizontally.
So in order to solve this problem you just need to select a pattern free.
So the left of should be zero because here we want at the bottom free to take eight parts of the bit
of the linearly and horizontal.
OK so that's why we assign the number 0 to the lay out.
And for the lay out rate instead of number one we just assign the value number 8 and then present until
January.
So now we can see that this part in free is taking eight parts of the linearly out horizontally.
Right.
So now somebody else says OK now I want to imagine that my linearly out to the width of my linear layout
is actually divided into 20 parts and I want my number one to take for example a 10 parts.
So here you can see that bottom number three is eight parts of the 20 parts.
Right and bottom number two is actually taking one part.
So now there are actually 11 parts left.
So we can now say that button number one can take 11 parts and then press on until you on your table.
So you can see that how these layouts change.
Right.
We have number one button free.
So you learn all about it later.
But here I just wanted to actually let you know about the lay out weight and how you are going to design
your layouts later in this course because we're going to create about 90 applications in the scores.
So it is necessary that you learn all about these attributes and how you're going to design your layouts
in this course.
So I think that's enough for this tutorial in the next tutorial.
I'm going to show you how you can run your application on the Android emulator.
Thank you very much for watching.
If you have any questions about these concepts that I've taught you so far please what's the discussion
in the course.
And then I do my best to answer all of your questions.
And I look forward to seeing you in the next tutorial.