1
00:00:00,180 --> 00:00:06,090
Again if you have a for loop here OK and this group is going to be executed until the value of this

2
00:00:06,090 --> 00:00:13,410
index variable is less than the value of the length of these animal images that is inside of this animal

3
00:00:13,610 --> 00:00:14,350
class here.

4
00:00:14,400 --> 00:00:15,210
OK.

5
00:00:15,660 --> 00:00:16,920
And here inside the for loop.

6
00:00:16,920 --> 00:00:19,230
First of all I actually created a constant.

7
00:00:19,320 --> 00:00:20,150
OK.

8
00:00:20,160 --> 00:00:21,720
And the name of this constant is I.

9
00:00:21,730 --> 00:00:28,500
And then I assigned the value of this index to this constant And here as you can see for example for

10
00:00:28,500 --> 00:00:33,200
the first time that this group is going to be executed the value of this in this variable is zero.

11
00:00:33,200 --> 00:00:36,950
OK so this zero is going to be assigned to this constant here.

12
00:00:36,990 --> 00:00:37,800
OK.

13
00:00:38,280 --> 00:00:41,340
And then it's going to really create an image view for us.

14
00:00:41,340 --> 00:00:42,030
OK.

15
00:00:42,210 --> 00:00:48,740
So it's going to actually assign the value to the image that is in the inside of the index zero of these

16
00:00:48,760 --> 00:00:49,760
animal images.

17
00:00:49,770 --> 00:00:54,380
So if you actually go inside this Animal class as you can see this is the index 0.

18
00:00:54,380 --> 00:00:56,870
OK this is the value that is inside of the index 0.

19
00:00:56,970 --> 00:00:58,600
So the value is bare.

20
00:00:58,620 --> 00:01:04,200
So it's going actually assign the image of the bear to this image view and then it's going to actually

21
00:01:04,200 --> 00:01:05,210
call the Smurfette.

22
00:01:05,340 --> 00:01:08,270
Let's set the layout perhaps for image viewer image view.

23
00:01:08,270 --> 00:01:08,950
OK.

24
00:01:08,970 --> 00:01:12,050
So it's going actually specify the width and height of the image view.

25
00:01:12,300 --> 00:01:17,980
And then here we have this padding attributes for this image view.

26
00:01:18,210 --> 00:01:20,720
And then it's going to actually make this image for you.

27
00:01:21,040 --> 00:01:24,970
So actually our listener to the clicks of the user.

28
00:01:25,160 --> 00:01:25,720
OK.

29
00:01:25,770 --> 00:01:30,550
And then it's going to add that image to this parent linearly out horizontal here.

30
00:01:30,570 --> 00:01:31,440
As you can see here.

31
00:01:31,440 --> 00:01:38,060
So as you can see here inside the emulate emulator and here are actually scroll to the left.

32
00:01:38,090 --> 00:01:43,040
Now let's actually see this image of you as you can see this is our bare image.

33
00:01:43,050 --> 00:01:43,720
OK.

34
00:01:44,030 --> 00:01:49,960
And now if I actually click on this image this block of code here is going to be executed OK.

35
00:01:50,550 --> 00:01:53,440
And now as you can see this image is actually here.

36
00:01:53,520 --> 00:01:54,090
OK.

37
00:01:54,180 --> 00:01:55,980
So here inside this attack like this and that.

38
00:01:56,010 --> 00:02:03,120
And inside of this uncle Mefford actually assigned this image that is inside of this specific index

39
00:02:03,330 --> 00:02:04,820
of these animal images.

40
00:02:04,860 --> 00:02:06,490
Great as you can see here.

41
00:02:06,590 --> 00:02:09,340
Going to be assigned to this I am animal image view.

42
00:02:09,600 --> 00:02:11,580
And then we call this our Mefford.

43
00:02:11,630 --> 00:02:13,980
Let's lay out prompts for imagery.

44
00:02:13,990 --> 00:02:16,860
I am I am the only man as you can see here.

45
00:02:17,040 --> 00:02:21,400
This is our image view and we have these TOSed here.

46
00:02:21,480 --> 00:02:22,060
OK.

47
00:02:22,230 --> 00:02:26,910
And then if we actually click on this image for you this message is going to be shown to us.

48
00:02:26,910 --> 00:02:27,920
This is Bear.

49
00:02:27,960 --> 00:02:31,320
So the name of the image as you can see here animal names.

50
00:02:31,800 --> 00:02:34,670
And we have these toasts that lend for that show.

51
00:02:34,740 --> 00:02:35,590
OK.

52
00:02:35,610 --> 00:02:38,950
And at the end you are actually after making this image.

53
00:02:38,970 --> 00:02:41,200
You are listening to the clicks of the user.

54
00:02:41,290 --> 00:02:44,790
We're actually adding that image viewer to this linearly or horizontal.

55
00:02:45,060 --> 00:02:49,820
And then it's going to actually add value to the value of this index variable.

56
00:02:49,920 --> 00:02:50,460
OK.

57
00:02:50,670 --> 00:02:53,470
And now the value of this index variable is one.

58
00:02:53,730 --> 00:02:57,860
OK so number one is less than the value of the length of these animal images.

59
00:02:57,960 --> 00:03:00,730
So again it's going to execute these lines of code here.

60
00:03:00,870 --> 00:03:07,140
First it's going to actually assign the value of this index are valuable to this constant.

61
00:03:07,170 --> 00:03:07,800
OK.

62
00:03:08,070 --> 00:03:16,720
So after each execution of this for a loop it's going to actually execute these lines of code here again.

63
00:03:16,770 --> 00:03:17,450
OK.

64
00:03:17,700 --> 00:03:22,880
So now it is actually assigning the value of this index which is number one to this constant.

65
00:03:22,880 --> 00:03:23,510
All right.

66
00:03:23,810 --> 00:03:24,060
OK.

67
00:03:24,060 --> 00:03:28,650
The first is going to actually create a constant and then it's going to assign that value index the

68
00:03:28,650 --> 00:03:34,350
value of this index a variable is constant and then it's going to again create an image view and then

69
00:03:34,350 --> 00:03:39,750
it's going to make that image through that specific image you are listening to the clicks to the clips

70
00:03:39,750 --> 00:03:40,540
of the user.

71
00:03:40,740 --> 00:03:47,250
And then here it is going to actually assigned that specific image in the inside of the animal images.

72
00:03:47,480 --> 00:03:50,750
Ari Trudy's I am the animal OK.

73
00:03:50,760 --> 00:03:51,750
As you can see here.

74
00:03:51,930 --> 00:03:56,970
So if I actually click on this image image here as you can see this is the image that is inside of the

75
00:03:56,970 --> 00:03:59,600
index of one of the animal images a.

76
00:03:59,730 --> 00:04:03,430
So now it is going to assign that image to the image view here.

77
00:04:03,690 --> 00:04:10,380
And here we are specifying the width and height of our image and here as you can see we created our

78
00:04:10,580 --> 00:04:11,750
host object.

79
00:04:11,970 --> 00:04:16,790
And if I click on this up image it shows us on our message.

80
00:04:16,860 --> 00:04:19,710
OK this is bird as you can see here.

81
00:04:19,920 --> 00:04:21,340
And we can see here.

82
00:04:21,600 --> 00:04:25,600
And here we are adding that image to these linearly and horizontal.

83
00:04:25,830 --> 00:04:27,210
OK.

84
00:04:27,210 --> 00:04:31,690
So hopefully that makes sense and I think that's enough for this tutorial.

85
00:04:31,830 --> 00:04:37,440
So if you have any questions please post the discussion in the course and then I'll do my best to answer

86
00:04:37,500 --> 00:04:38,750
all of your questions.

87
00:04:38,940 --> 00:04:42,900
Thank you very much for watching and I'll see you in the next tutorial.

