Okay now that is done about a user interface is actually finished.
OK so now let's actually go inside this main activity that Java find here and now let's actually delete
these lines of code that are related to the Options menu.
And then there is this block of code that is related to the floating action button.
And now we can actually put in our own codes here.
First of all let's actually create a class called animal here.
So just click on File New and then click on Java class and as for the name of our class just type in
here Alamein and then click on OK.
So now as you can see this is our animation.
So now I want to actually track some images into my project so I have the images on my desktop as I
guess here.
So I just need to actually select this adorable for that as you can see and hear I can actually copy
these images.
So I just need to right click on them and then copy 10 items and I just need to select this a drivable
folder right click on it and then here I just need to select this paste here.
OK.
And now I just need to click on OK.
So now as you can see our images are here.
OK.
So now now inside this Animal class I want to actually create two arrays here.
So I'm just gonna paste in 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 I have an aesthetic error here of type integer and this array actually holds
the ID.
The idea of the resources of our image is as you can see here inside this triable folder and we have
another static string array.
So this era is actually an array of string values.
And these are I actually hold this array actually hold the names of odd animals as you can see here.
And now let's actually go back and say this main activity that double file here.
So inside of this main activity class I'm going to actually declare some objects here.
So as you can see here these are the lines of code that they actually pasted here.
First of all in line 13 I actually declared an object of type view flipper.
OK so as you can see here inside this content underline minute example you have an object and a component
here called view view flipper.
OK.
So I actually declare this object and I actually are declared two objects of type image BOWDEN As you
can see here the name of the first one is between an animal image next and the name of the second object
is between an animal image previous so that you can see here inside this content underline minute example
in situs linearly at horizontal.
You have these two images here.
Image buttons and now you have a view animator as you can see here.
So I actually declare this object here.
And inside this content underline mean that it mean that a symbol as you can see here you have this
animator here inside these linearly alphabetically.
So now inside these uncreate Meffert I'm going to actually instantiate these objects that they actually
declared inside the main activity class.
So now when I pasted 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 the lines of code that they actually pasted here.
First of all they actually instantiated this between animal and animal image next button here.
As you can see on here as you can see a cast that this object to an image BOTTEN object as you can see.
And then here you referred to the ID of this object are that ID that bit here and in one image next.
And here this is our BTA image previous As you can see here.
I tested this object to an image but an object.
And then here I referred to the idea of this object or that idea that between animate image previous.
And we have this view Flipper here as you can see and hear I actually Chastity's object to of you Philippe
an object.
And here I referred to the idea of this object or that idea that you flipper and here as you can see
we have this view animator object and then I actually cast this object to a view animated object find
view by ID or that ID that view animator object.
OK so now let's actually create some MFX inside the main activity class and then here after the end
in calibrates of these uncreate Smurfette as you can see here here inside this class and then I'm going
to try to create a method here.
So I'm just going to paste the same lines of code here and then I'm going to explain to you what's going
on here.
So the first method that we want to actually create inside this class is this method.
Let's set the layout programs for image view.
OK.
So as you can see the axis if I get off this MF for this public the return type is void.
So this means that this method is going to return nothing.
And the name of this method is let's lay out perhaps for image view and decide if it actually accepts
an argument of type image view.
As you can see here and inside this method I'm just specifying that image view that citadels perhaps.
So here I want to actually specify that the image view of Viets and the image view height as you can
see here.
So certainly as new linearly out that layout problems.
So this method is only valid our images if our viewers are going to be inside a linear layout.
OK.
So linearly out that lairds perhaps 1000 for the image of view and 1000 for the height of our imagery.
OK.
And now let's actually create another method here inside this main activity class.