Hi everyone in this theater all 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 at 47 and then click
on Next choose API 16 Android 4.1 Lee-Payne for the minimum SDK.
Click on next here.
Choose our Blancher activity next.
Here click on finish.
So now let's actually select this hello world text view and then present it here on your keyboard.
And now it's actually double click on this.
And as for their layout activity underline made that example here choose this faluting action button
and then and then a person delete key on your keyboard.
So let's actually go back and say this content underline made that example.
And now we want to actually designed the user interface of our application.
But first of all let me actually to show you a demo of the application that you want to create in this
to your Tauriel.
So as you can see here this is our application that we want to create in the Seattle area.
And as you can see here it says these are our animal images in the gallery.
So we have it takes few here.
And this is these are the images.
So if you have a gallery so we want to use a gallery in our application and here I can actually scroll
to the left in order to see the other animals here.
As you can see so and as you can see if I scroll to the right I can see the other animals here.
OK.
Now if I scroll down a little bit here you can see it says these are all animal images in a scroll view.
OK.
A horizontal scroll view.
So here I have an horizontal scroll you here as you can see if I actually scroll live to the left or
scroll to the right I can see these images.
OK.
And if I actually click on these for example image I can see that specific image at the bottom.
OK.
So here if I actually click on this fish here I can see this image and I can see this tossed here.
So if you actually click on this for example this horse I can see this horse here and I can see it is
toast.
OK.
So let's actually create this application.
OK.
So first of all we need to actually write our linearly out vertical at the center of this relatively
out here.
So now let's actually track our scroll view of vertical scroll view into this linearly outwards vertical.
OK.
So here inside of these containers fall there you have these vertical scroll wheel here.
So just select it and put it at the center of this linearly I swear to god.
OK.
So I just need to put it here.
And now let's actually try to linearly vertical into these vertical scroll view.
So as you know scroll you can only accept one direct choice.
OK so I can just practice linearly out of article here and then I can't just put it in situs scroll
you here.
OK.
And then I can actually put in my computer my user interface components inside this linearly out call
here.
OK.
So first of all I need to actually put in a large takes you into These are linearly and vertical.
OK.
So for the lay out our gravity as you can see we can actually choose the center.
So just a selectees attribute here.
And then selectees horizontal.
OK so now let's actually double click on these text view.
And for the text just type in here these are our animal images inside a gallery and then a person enter
key on your keyboard.
So now let's actually find that gravity attributes of these tapes view here.
As you can see here we have this gravity as tribute here.
So just open this gravity attribute and then our checked is our center horizontal checkbox here.
So as we can see now the taste of this state's view is at the center of these thing.
OK.
So now let's actually track a gallery into this linearly out vertical.
So as you can see here inside these containers folder if you have this gallery here OK so just select
it and put it inside these are linearly out vertical here.
OK so we have this gallery here.
So now I want this gallery to be at the center of this linearly out vertical OK so we have this Delury
and it is at the left hand side of this are linearly out vertical.
So I can just select this linearly elsewhere the.
And as you can see we have these gravity attributes for these linearly outward ticket.
So just check these Center underline horizontal checkbox here that is related to this gravity.
And if you actually click on this get it here.
Now as you can see this gallery is at the center of this linearly outward ticket.
OK.
Let's actually drag and either takes few into this linearly it's vertical.
So just select this large takes stakes here and put it inside these linearly alphabetical here.
OK.
So this is our taste.
Double click on it.
OK.
And for the ticks just typing here these are our animal images inside the horizontal scroll view.
OK.
And then present Enter key on your keyboard.
OK.
So now let's actually our select this takes you and then find the gravity attributes as you can see
here.
We have this gravity attribute here.
OK.
And then it is set center underline horizontal checkbox here.
So as you can see here now are the text of the state's view is actually at the center of the state's
view.
OK so now let's actually track a horizontal scroll view into this linearly outwards the call.
So here inside this container this fall there as you can see we have our horizontal scroll view here
as you can see.
So just select it and put it inside this linearly out vertical here.
OK.
So this is our horizontal scroll view.
And then let's actually track a linearly out horizontal as you can see we have a linearly or horizontal
here.
So just select it and put it inside these horizontal scroll view here.
OK.
And now let's actually select this linearly and horizontal here as you can see that is inside of these
horizontal scroll view.
OK.
And let's actually find the ID attribute and the ID just type in here linear lay layout horizontal.
OK.
Now we want to actually assign an ID to these are lay out linearly with horizontal.
OK.
Now let's actually drag an image view into this linearly out vertical here.
OK.
So it's just selectees image for you here and put it inside these linearly out vertical.
OK.
Now let's actually select this image view here and actually find the idea.
The idea attributes.
So this is the id attribute and the ID just type in here and G animal.
OK.
And then press on Enter key on your keyboard.
OK.
So here are actually to select the state's view.
And now I want to actually change some of the attributes of the state's view for example or you want
to increase the size of this text view.
So I need to actually find the text size attribute.
So for the size just assign the value of 50.
OK.
And for the color you can actually assign a color for example hash tag 0 0 F F 0 0 and then press enter
key on your keyboard.
OK.
And let's actually to select this text view here and now let's actually find the text size attributes
as you can see this is the thing that the text size attribute and for the size of the text view I can't
just assign the value of 50.
And now for the color of the states you can just put in a hash tag here and I can't just type in F F
for example of 4 4 and 0 0 and then press Enter key on your keyboard.
And now as you can see the carload of these takes few is actually changed to another color.
OK so now let's actually go back inside the main activity of a fight here and now let's actually select
these lines of code that are related to the Options menu and then actually the selectees block of code
that is actually related to the floating action button.
Ok so if we don't need this block of code here OK and then press on into the delete key on your keyboard.
And now let's actually put in some more lines of code here.
OK.
So first of all let's actually declare an object of type Gallerie here in the state of our class.
So here I can just type in Gelati.
OK.
So by the way let me point out that the gallery is actually deprecated.
OK.
In Android 4.1.
OK.
And as you can see here.
But I think it is still useful and we can use it.
OK in other applications.
OK.
So you may actually face other applications that are actually using the using gallery.
OK so you may want to know how to use this gallery.
Actually we did ok how to use this component in your applications.
OK.
So let's actually go back and say this main activity that I will fight and as you can see that there
is a crust on this gallery here and that means that this gallery is actually deprecated.
OK.
We can actually use a horizontal scroll view or other components.
OK.
So but for this application I want to use gallery.
OK.
So here I referred to the name of this gelati class.
OK.
And that the name of this gallery is Gallery.
And inside is uncreate Smurfette.
I can actually instantiate this gallery object.
So I just referred to the name of this object gallery.
Assignment operator and then I need to actually cast this object to a gallery object.
OK.
Find view by ID are that Id dot ANGELETTI.
OK.
So as you can see here inside this content underline minute example the idea of this actually that the
idea of this gallery is actually let's actually find the idea attributes here as you can see the idea
of this gallery East Gallery.
OK.