Again if you have a for loop here OK and this group is going to be executed until the value of this
index variable is less than the value of the length of these animal images that is inside of this animal
class here.
OK.
And here inside the for loop.
First of all I actually created a constant.
OK.
And the name of this constant is I.
And then I assigned the value of this index to this constant And here as you can see for example for
the first time that this group is going to be executed the value of this in this variable is zero.
OK so this zero is going to be assigned to this constant here.
OK.
And then it's going to really create an image view for us.
OK.
So it's going to actually assign the value to the image that is in the inside of the index zero of these
animal images.
So if you actually go inside this Animal class as you can see this is the index 0.
OK this is the value that is inside of the index 0.
So the value is bare.
So it's going actually assign the image of the bear to this image view and then it's going to actually
call the Smurfette.
Let's set the layout perhaps for image viewer image view.
OK.
So it's going actually specify the width and height of the image view.
And then here we have this padding attributes for this image view.
And then it's going to actually make this image for you.
So actually our listener to the clicks of the user.
OK.
And then it's going to add that image to this parent linearly out horizontal here.
As you can see here.
So as you can see here inside the emulate emulator and here are actually scroll to the left.
Now let's actually see this image of you as you can see this is our bare image.
OK.
And now if I actually click on this image this block of code here is going to be executed OK.
And now as you can see this image is actually here.
OK.
So here inside this attack like this and that.
And inside of this uncle Mefford actually assigned this image that is inside of this specific index
of these animal images.
Great as you can see here.
Going to be assigned to this I am animal image view.
And then we call this our Mefford.
Let's lay out prompts for imagery.
I am I am the only man as you can see here.
This is our image view and we have these TOSed here.
OK.
And then if we actually click on this image for you this message is going to be shown to us.
This is Bear.
So the name of the image as you can see here animal names.
And we have these toasts that lend for that show.
OK.
And at the end you are actually after making this image.
You are listening to the clicks of the user.
We're actually adding that image viewer to this linearly or horizontal.
And then it's going to actually add value to the value of this index variable.
OK.
And now the value of this index variable is one.
OK so number one is less than the value of the length of these animal images.
So again it's going to execute these lines of code here.
First it's going to actually assign the value of this index are valuable to this constant.
OK.
So after each execution of this for a loop it's going to actually execute these lines of code here again.
OK.
So now it is actually assigning the value of this index which is number one to this constant.
All right.
OK.
The first is going to actually create a constant and then it's going to assign that value index the
value of this index a variable is constant and then it's going to again create an image view and then
it's going to make that image through that specific image you are listening to the clicks to the clips
of the user.
And then here it is going to actually assigned that specific image in the inside of the animal images.
Ari Trudy's I am the animal OK.
As you can see here.
So if I actually click on this image image here as you can see this is the image that is inside of the
index of one of the animal images a.
So now it is going to assign that image to the image view here.
And here we are specifying the width and height of our image and here as you can see we created our
host object.
And if I click on this up image it shows us on our message.
OK this is bird as you can see here.
And we can see here.
And here we are adding that image to these linearly and horizontal.
OK.
So hopefully that makes sense and I think that's enough for this tutorial.
So if you have any questions please post the discussion in the course and then I'll do my best to answer
all of your questions.
Thank you very much for watching and I'll see you in the next tutorial.