Hi everyone in this year Tauriel we're going to go ahead and create another Android application.
So just click on this start in your Android studio project and for the application name just typing
here app 50 and then click on next.
And then here choose AP A16 Android 4.1 Jelly Bean for the minimum STK.
Next here choose plant activity next.
And then here click on finish.
OK.
Now let's actually select this hell over takes you here and then person delete key on your keyboard
and then double click on this red folder.
Lay out activity underline that example and that here choose this Flosi an action button here.
And then our present delete key on your keyboard.
So now let's actually go back and say this content underline minute example and here you want to actually
design the user interface of our application.
So first of all it's actually like a linearly out vertical.
OK.
At the center of this are relatively out here.
OK.
And now as you can see there are some paddings here as you can see.
So this actually to go in so is it takes tap here.
And here you can see these are padding values here.
OK padding bottom padding actually left right on top.
So these attributes are for these.
They're relatively out.
OK.
And this linearly as you can see that you actually drag into these relatively healthy here as you can
see.
This is here.
OK.
Orientation vertical.
Lay out each match parent.
Lay out how much parent.
And here it is again.
See it says.
Lay out our center resti called through.
OK.
So this is actually the center of this relatively.
OK.
And here it says lay out Center horizontally through.
So again as you can see it is at the center.
OK.
So hopefully that makes sense.
And now let's actually drag a large takes view.
OK.
Into this linearly outwards the call.
So put it at the center of these linearly aesthetical and double click on it.
OK.
And for the text just typing in here this is our first activity.
OK.
And then our press Enter key on your keyboard.
Now let's actually go inside this takes tab here as you can see.
And now as you can see our text is here.
OK.
Now you can see this.
It says play out with wrap Content-Length hide wrap content takes appearance takes text appearance large.
OK.
And the text is this is our first activity.
OK.
And the idea is this.
OK.
And the left gravities is actually the center horizontal so I can actually add another attribute here.
I can say just a text size.
OK and for the text size I can just type in for example number 6 the DP So it stands for density pixels.
OK so now let's actually go back and say this design top here as you can see.
And here you can see now our text is now much larger the size of our takes is much larger.
Now let's actually track a button into this linearly outwards and below this takes few here and let's
actually double click on it and for the text just typing here.
Let's go to second activity second activity.
OK.
And for the ID just type in here between second activity.
OK.
And then a person enter key on your keyboard.
So now let's actually go inside this a text tab here again.
And now you can see our button is here.
OK.
It says lay out Viets is Lappe content right.
Lay out height.
Is that content again as you can see the text is.
Let's go to a second activity.
OK.
And as you can see the idea is Beati and the second activity and the lay out gravity is center horizontal.
OK.
And I can actually add other attributes for it.
For example paddings.
OK.
And for the padding.
I can just assign the value for example 50.
So.
DP OK.
Now let's actually go back and say this is on top.
And now as you can see the padding is actually much bigger.
OK.
So let's actually go back and say this takes top here again.
Now I can actually add other values for example Margene Margene.
OK.
At the margin again I can just assign a value for DP.
Now let's actually go back and say this design top here you can see now there is a Margene here.
OK.
So as you can see here because I just only referred to padding or just referred to Margene and not other
for example specific attributes such as padding left or padding right.
I was going to actually assign this value to all of those directions.
OK padding left padding right padding top and padding bottom a key or here as you can see disvalue is
for a margin top margin bottom margin lift and margin right.
OK.
So hopefully that makes sense.
Let's actually go back inside this design up here.
Now as you can see the design of this layout is actually finished.
Now I want to actually create another layer called second activity.
So let's actually click on this view here tool windows and then click on Project OK.
And now it's actually selectees lay out a folder here.
OK.
Right click on it new and then click here as you can see we have this example here.
OK here's just select this layout exemplified.
OK.
And for the layout file name just type in here.
Second activity.
So remember that for the name of the layout for the name of your exemplified you need to actually start
your XML file name with a lower case letter.
OK.
So for example here can just take a second.
And here in order to separate two words here for them I out name I can't just put in an underline character
or key activity OK.
So hopefully that makes sense.
And here for the root tag here.
Just type in here relative lay out and make sure that you actually write this name correctly.
OK.
As the same name here relatively out and click on finish.
So as you can see here we have our lay out here.
This is our second activity that exemplify.
And if we actually go back and say it inside this takes top here as you can see it says relatively OK.
So if you are right this name incorrect incorrectly it's going to actually show you an error in this
design.
OK.
So make sure that you actually write this read it relatively to name it correctly.
OK.
So if I actually put an s here and if I go back and say this design to it says the following classes
could not be found.
OK.
So if I go back and say this text tab now I can just delete it.
This is here and now the error is gone.
OK.
So hopefully that makes sense.
And now let's actually designed this of lay out here.
OK so just double click on this second underline activity that.
Example here in order to make this area wider and now you want to actually the design does layout.
So here again just putting up a linearly out vertical is relatively healthy.
OK.
So just put it at the center of this relatively out and as you can see there are not headings here.
OK.
So if we go back inside this takes type here as you can see we cannot see the padding attributes here.
So I can just add value at that attribute Hiroki at that value here.
So I can't just take in padding.
OK.
And if I press Enter key on my keyboard now I can assign a value for the padding so I can just assign
the value 16 for the padding here.
OK 16 DP and if I go back and say this design top now you can see these are paddings here.
OK.
So now let's actually do a large takes of you at the center of this linearly out of vertical double
click on it and here for the text just typing here.
This is our second
activity.
OK and then press enter key on your keyboard.
Now let's actually go back and say this takes up actually the text top here.
OK.
And now I can actually add another attribute here.
Text size.
And for the text size I can just put it in the value for example 70 OK 70 DP and if I go back and say
this design tab.
Now we can see this value here.
OK.
And I can actually change that value here again.
For example number 90.
OK.
And if I go back and say this design to now you can see this value here.
OK.
And again just putting an exclamation mark at the end of this text here.
OK.
And the inside is designed.
Now you can't see this exclamation mark here.
OK.
So hopefully that makes sense.
Now let's actually go back and say this main activity that double file here and here let's actually
delete these lines of code that are actually related to the options menu.
OK.
And then delete these lines of code that are related to the fluking action button.
And here let's actually create a button object here.