Hi everyone in this theater all we're going to go ahead and create another Android application.
But first of all let's actually configure the Android is OK.
So here just click on this configured here and then click on STK manager and here as you can see let's
just click on this launch as standalone STK manager and then we should wait and then it's going to open
this window for us.
So first of all make sure that you actually install the and realistic tools as you can see here the
latest the latest version Android STK platform tools.
Android is the key tools as you can see here.
Make sure to install the latest version of Android as the big tools here and here as you can see of
here we have this android 7 API API 8:24.
And here make sure to install STK platform here installed.
And here are depending on the on the version of the CPO that you are using.
Make sure to actually install these are for example these are 64.
We ate a system image.
All of these other options.
But because I have actually a Mac and I have actually a 64 bit system I actually installed this one
a Google API is Intel 86 atom system image.
And here as you can see.
Make sure to install the Google a eyes and also make sure to install sources for Android SDK.
If you want to you can actually install documentation for Android SDK here.
OK.
But it's optional you may actually want not to actually install this documentation here and then make
sure to actually install these.
Or Android support repository.
OK.
And make sure to install Google Play services Google a repository and this one Intel X 86 emulator accelerator
hacks them installer OK.
Make sure to install these components.
OK.
So this is really important.
And let's actually go back to here.
Let's actually cancelled here and now we want to actually create an to studio project.
So just click on the start and you add to your project and then for the application name just type in
here app 59 and then click on next and here choose API 16 Android 4.1 jellybean for minimum STK and
then click on next and here choose MT activity next.
And here are do not change anything.
And then click on our finish.
So as you can see here our project is created.
So first of all let's actually design the user interface of our application.
So just double click on the seller's folder and then DoubleClick and this layer folder and here DoubleClick
and the activity under alignment of the examiner and he and as you can see this is the design of our
user interface.
So here are just DoubleClick and this activity Underland mandate's them in here.
And first of all just selectees hello world takes you here and then press on delete key on your keyboard.
And now let's actually track a linearly out vertical.
Actually like linearly as vertical into this relatively healthy you need to actually select a linearly
as vertical.
So just select this text tab here at the bottom as you can see here we have a relatively elsea right.
So here I want to put a linearly out.
Insight is relatively close.
So let's go back to our Design tab here and now I just need to find out there.
So here as you can see inside this palette section we have these layouts folder and inside this labels
folder we can actually find the linearly vertical here as you can see just select it and drag it here
at the center of this relatively out here.
OK.
Now as you can see here we have a linearly vertical inside this relatively out here.
OK.
So I put that really linearly and vertical at the center of this relatively out here.
Now let's actually try a text view into these linearly as vertical.
So as you can see here we have this takes a view here inside this which is smaller.
Just select it and drag it here.
As you can see and put it here.
As you can see here.
So as you can see we have this text view.
And in the on the right hand side you can see these properties as you can see.
And for the lay out feet here as you can see it says Match parent.
And for the lay out height it says ALAP content.
And this text is text view.
So let's actually to change the text view or the text of the state's view.
So they are selected and deleted aren't here just typing.
Welcome to our Welcome to intermediate
Android programming programming section
OK and that person enter key on your keyboard.
And now I want to actually increase the size of these artists view.
So here at the bottom you can see it is you all properties.
Just click on it and here as you can see we have all these properties here.
First of all let's actually change the ID of the stakes you so just selected here.
And for the idea just typing here th the welcome or Tastee welcome as you can see here and in person
enter here on your keyboard.
And then let's actually find the text size attribute.
So here as you can see we have we need to actually find the text size as tribute.
So now I should actually scroll here.
So in order to find the text size attribute I just need to scroll down here as you can see just scrolling
down on here.
As you can see we have all these attributes.
And here we just need to find the text size attribute.
So as you can see this is the text size attribute.
So let me actually make this area wider.
We have this takes this attribute and it says at sign D-men slash tick size small here as you can see
we have all this text material take size small material.
So what is this.
So let's actually go to our pratique project structure.
So I just hold the command key and then press the number one key on my keyboard.
So if you want to you can actually click on View tool windows and then project and hand as you can see
inside this app here.
Inside this red folder here as you can see we have these values folder.
So just open it and here and as you can see we have some xml files here as you can see for this text
size here.
As you can see we have this at sign smiled at sign a demon right.
So it says it is actually referring this referring to this folder here to this directory.
So let's open this directory here.
As you can see here we have these demons that examine and demonstrate examine and inside the Prentice's
you can see this value w eight hundred twenty.
DP So we don't want to actually work on this example and fight.
We just want to work on this exemplify demons that said so publicly Genet.
And as you can see here inside this is exemplified here as you can see inside these resources packed
here.
We have these values the men name activity horizontal Margene.
This is the name of our value and this is the actual value 16 DP.
And here we have this demon here the man name activity of vertical Margene 16 DP and as you can see
this is the name of this value.
And this is the actual value.
So the China actually used these values.
This string these actually these string values these examen values in order to refer to these actual
values instead of hard coding our values inside our properties.
As you can see here I can just put a name and an I can I can literally create art Hagg here for example
inside these demons.
Demons that exemplify arge and create some packs and I can actually put those values here and instead
of hard coding our values here and assigning those values to our text size or other attributes are collected
or referred to those names and it and it is better it's way better.
So at this time let's go inside the statements for the here and now I can actually create attack and
I can just say D-men and the name is going to be.
For example welcome Welkom text size as you can see here.
And I just need to put a closing tag here.
And inside these tags again just typing for example a 50 dpi.
But but because I am actually specifying the size of my text view OK the size of the text of my text
view it's better to put a speed.
OK.
This is very important.
50 Espey And now let's actually go back into that activity underline minute example.
So now let's actually click on this text tab here at the bottom.
Just click on this takes tab and here as you can see we have this takes you right.
So now I want to actually assign the size of this text view.
I want to specify the size of this text view.
So here I can just type in text text size.
And as you can see the autocomplete feature is now allowing me to actually choose this one and code
and text size.
So if I actually press on interview on my keyboard and in the in the double quotes I can actually type
in at sign D-men as you can see here slash Sahira as you can see we have this value Welkom underlined
based on the length size.
So if we put that value we put this value inside our demands that exemplified right.
So I can actually select this one here and here as you can see let's go back to our design tab at the
bottom as you can see we have these two taps.
So I just need a this design type here.
And as you can see here the size of our takes is actually changed.
OK.
Now the size of our takes is actually 50 espie.
OK but you're referring to this name.
I could actually get disvalue 50 s.p.
So here inside this activity underline minute exam I actually changed the size of the of these takes
view.
Welcome to Android programming section on here.
Let's actually find the gravity attribute that is related to this text view.
So I just need to scroll down here scroll at the bottom as you can see here we have this gravity attribute.
So I just need to open this gravity strip by just click on this little triangle here.
And here we have these values.
So here I just need to check this cental underline horizontal checkbox here.
Just check this one here.
The center underline horizontal and as you can see here our text is actually centered inside this text
view.
OK.
So if I want to actually centered this text view here inside this linearly or vertical I need to actually
change the layout gravity.
So here let's actually go inside this text tab here as you can see.
And now as you can see here we have this gravity attribute that is actually added to this text view
here as you can see.
So now I can actually change the layout gravity and this layout gravity is going to determine how this
text is going to be positioned inside this linearly out.
OK.
So here I put this value Android Colan lay out underlying gravity center underline horizontally as you
can see here.
So let's go back to our design tab here.
As you can see now as you can see we have this text view that is actually centered horizontally inside
is nearly vertical.
So as you can see here the layout of this takes you is actually much panning right.
So let's change this value to wrap content.
Now you can see the layout width of my text view is Lappe content.
So now let's actually change the text size of this text view.
So here we have this text size attribute and here instead of disvalue 50 espie are concerned about the
number can speak.
And if we actually press on until Q On my keyboard.
Now we can see here this takes you is actually centered horizontally inside this linearly as vertical.
OK.
So hopefully that makes sense.