1
00:00:00,180 --> 00:00:04,440
So now as you can see our application is actually running on the emulator.

2
00:00:04,620 --> 00:00:06,180
And here we can see this image.

3
00:00:06,210 --> 00:00:10,910
And let's actually click on this image view here and let's see what happens.

4
00:00:10,920 --> 00:00:16,380
So now as you can see we can see this image here and let's actually change this image so scroll to the

5
00:00:16,380 --> 00:00:18,930
left and actually click on this image here.

6
00:00:19,170 --> 00:00:20,610
And now we can see this image.

7
00:00:20,820 --> 00:00:21,850
And this is the torso.

8
00:00:21,870 --> 00:00:22,490
OK.

9
00:00:22,650 --> 00:00:29,800
So now I want to add actually some animation effects to this image switcher as you can see here.

10
00:00:29,820 --> 00:00:32,220
So it is going to be a little bit nicer.

11
00:00:32,220 --> 00:00:32,770
OK.

12
00:00:32,940 --> 00:00:38,790
So now inside this main activity the job filed here after this line of code that says I am just creature

13
00:00:39,060 --> 00:00:45,850
that says factory here now and when actually I think some are animation effects to this image switcher.

14
00:00:45,870 --> 00:00:50,400
OK so now I'm going to actually paste in some lines of code here and then I'm going to explain to you

15
00:00:50,400 --> 00:00:51,650
what's going on here.

16
00:00:51,990 --> 00:00:56,790
So as you can see here these are the lines of code that they actually face that here first about in

17
00:00:56,860 --> 00:01:03,210
1955 I referred to this image object IMT switcher data set in animation.

18
00:01:03,240 --> 00:01:03,800
OK.

19
00:01:03,900 --> 00:01:05,370
So this is the set in animation.

20
00:01:05,370 --> 00:01:10,650
So when the image is actually going to appear on the screen as you can see when I actually click when

21
00:01:10,650 --> 00:01:13,530
I actually select one of these animals.

22
00:01:13,560 --> 00:01:15,540
So for example this dolphin.

23
00:01:15,780 --> 00:01:17,960
So this is going to be the set in animation.

24
00:01:18,000 --> 00:01:25,170
So this time here inside the practices I refer to this animation utils dots laut animation.

25
00:01:25,170 --> 00:01:31,620
So as you can see here if you have a class called animation you teals and we have a static method actually

26
00:01:31,630 --> 00:01:34,610
this is a class for the key that animation.

27
00:01:34,620 --> 00:01:36,950
So let's actually go to our browser here.

28
00:01:36,990 --> 00:01:41,910
As you can see you can actually enter this you are in your web browser and then you will be guided to

29
00:01:41,910 --> 00:01:42,640
this page.

30
00:01:42,660 --> 00:01:44,930
So we have this animation utility class.

31
00:01:45,060 --> 00:01:48,310
So as you can see this is actually a public class animation utility.

32
00:01:48,390 --> 00:01:49,070
OK.

33
00:01:49,350 --> 00:01:50,570
And this is the summary.

34
00:01:50,580 --> 00:01:54,340
And here it says define common utilities for working with animation.

35
00:01:54,360 --> 00:01:54,930
OK.

36
00:01:55,290 --> 00:01:57,370
And here you can see some of these benefits.

37
00:01:57,450 --> 00:01:59,460
And here this is the animation method.

38
00:01:59,610 --> 00:01:59,840
OK.

39
00:01:59,850 --> 00:02:04,200
And it says that this if it loads an animation object from a resource.

40
00:02:04,200 --> 00:02:04,740
OK.

41
00:02:04,830 --> 00:02:07,060
So this Meffert actually accepts two arguments.

42
00:02:07,140 --> 00:02:08,490
The first one is the context.

43
00:02:08,490 --> 00:02:13,660
So as you can see here this method actually accepts two parameters the first parameter is actually the

44
00:02:13,660 --> 00:02:17,820
context as it has the application context used to access resources.

45
00:02:17,820 --> 00:02:25,100
So as I said before we use context in order to actually access resources outside of our activity.

46
00:02:25,110 --> 00:02:25,640
OK.

47
00:02:25,770 --> 00:02:28,430
So application context used to access resources.

48
00:02:28,440 --> 00:02:28,980
OK.

49
00:02:29,010 --> 00:02:35,260
And the second argument as I can see is actually the ID end of the resource ID of the animation to load.

50
00:02:35,280 --> 00:02:35,760
OK.

51
00:02:35,940 --> 00:02:41,090
So we need to actually choose the what kind of animation we want to load on our particular object.

52
00:02:41,140 --> 00:02:44,660
OK so now let's actually go back to our Android studio.

53
00:02:44,800 --> 00:02:49,590
So animation you tell us that lothe animation and as you can see here we need to actually passing two

54
00:02:49,590 --> 00:02:51,600
arguments to parameters.

55
00:02:51,600 --> 00:02:57,600
Main activity that this is the context and the second one is the android that are that and then that

56
00:02:57,600 --> 00:02:58,310
faded.

57
00:02:58,320 --> 00:03:05,040
So we have other other kinds of animations so if I could you can delete this fading in here and here

58
00:03:05,040 --> 00:03:08,640
as you can see we have these animations sliding sliding left.

59
00:03:08,800 --> 00:03:09,610
OK.

60
00:03:09,660 --> 00:03:12,690
And here as you can see this is the sit out animation.

61
00:03:12,690 --> 00:03:15,490
So I've just set out animation.

62
00:03:15,540 --> 00:03:20,000
So this happens when the image is going to be actually disappear.

63
00:03:20,160 --> 00:03:27,200
OK so when I actually if I actually go back and say this emulator so here of any user as you can see

64
00:03:27,200 --> 00:03:33,940
this is Dolfin OK so if I click on this of this dolphin image is going to be disappeared from the screen.

65
00:03:33,960 --> 00:03:35,720
That animation is going to happen.

66
00:03:35,760 --> 00:03:36,160
OK.

67
00:03:36,300 --> 00:03:39,260
So I am just switchers that set set out animation.

68
00:03:39,540 --> 00:03:44,440
And here inside the prentices animation you utilize that animation.

69
00:03:44,490 --> 00:03:49,740
So we need to actually first of all passing the context main activity that this and the second and the

70
00:03:49,740 --> 00:03:56,480
second one is how the kind of animation that we want to put that we actually want to implement on an

71
00:03:56,470 --> 00:03:56,890
object.

72
00:03:56,890 --> 00:03:57,370
OK.

73
00:03:57,420 --> 00:03:59,090
Android that are.

74
00:03:59,150 --> 00:04:00,630
And in that fadeout.

75
00:04:00,630 --> 00:04:06,330
So I can actually delete this one and choose sliding slide out right.

76
00:04:06,360 --> 00:04:10,740
OK so now let's actually run our project and see what happens.

77
00:04:10,740 --> 00:04:14,980
So as you can see here our application is running on this emulator.

78
00:04:15,150 --> 00:04:21,290
And here it's actually as you can see we can actually scroll to the left in order to see the other images.

79
00:04:21,330 --> 00:04:27,840
And if I actually click on this image now as you can see we have an animation effect here.

80
00:04:27,840 --> 00:04:28,420
OK.

81
00:04:28,530 --> 00:04:32,950
And if I actually select this image here now you can see this animation effect.

82
00:04:32,970 --> 00:04:33,660
OK.

83
00:04:33,870 --> 00:04:35,660
So it is actually these like this one.

84
00:04:36,330 --> 00:04:37,610
And it's an it's really nice.

85
00:04:37,620 --> 00:04:39,210
OK.

86
00:04:39,220 --> 00:04:40,320
So beautiful.

87
00:04:40,770 --> 00:04:46,250
So this one as you can see here we have this image of these folks here.

88
00:04:46,410 --> 00:04:52,380
And as you can see here because we said that this image creature as you can see because we said that

89
00:04:52,380 --> 00:04:58,350
the left part of this image view as you can see here to be that content for the beach and the content

90
00:04:58,350 --> 00:04:59,660
for their height.

91
00:05:00,140 --> 00:05:02,860
See this image it's actually a little bit larger.

92
00:05:02,930 --> 00:05:06,720
OK so it's going to take a little bit larger space.

93
00:05:06,950 --> 00:05:07,780
OK.

94
00:05:08,210 --> 00:05:13,840
And let's actually to select other images and here you can see this image here.

95
00:05:14,090 --> 00:05:14,690
OK.

96
00:05:14,930 --> 00:05:19,850
So if I actually select this one now we can see this image here.

97
00:05:20,300 --> 00:05:21,050
OK.

98
00:05:21,500 --> 00:05:25,990
So you can actually change this Arap content to for example match parent.

99
00:05:26,060 --> 00:05:26,580
OK.

100
00:05:26,750 --> 00:05:32,660
So I can just type in match parent for the Wii and match parent for the height.

101
00:05:32,810 --> 00:05:33,740
OK.

102
00:05:34,310 --> 00:05:37,010
So let's actually do it on our project again.

103
00:05:37,070 --> 00:05:39,270
So here again our application is running.

104
00:05:39,290 --> 00:05:44,620
So if I select this image now you can see this image here at the bottom.

105
00:05:44,630 --> 00:05:50,390
So now if you actually scroll to the left in order to access it to see the other images here you can

106
00:05:50,390 --> 00:05:51,660
see this image here.

107
00:05:52,010 --> 00:05:55,370
And here you can see this here this image.

108
00:05:55,370 --> 00:05:58,730
Now you can see this image here.

109
00:05:58,730 --> 00:06:02,460
Now this actually the selectees image and we can see this image here.

110
00:06:02,650 --> 00:06:03,080
OK.

111
00:06:03,140 --> 00:06:09,300
So it is actually taking the entire Viets and the entire height of the actually image switcher.

112
00:06:09,380 --> 00:06:12,240
As you can see here match parent.

113
00:06:12,440 --> 00:06:19,670
And so remember that it says that match parent match parent refers to the parent of this image.

114
00:06:19,690 --> 00:06:20,980
Suture OK.

115
00:06:21,080 --> 00:06:25,620
So for example match parent refers to that to the parent of this image view.

116
00:06:25,640 --> 00:06:27,680
So here inside is make a few Mefford.

117
00:06:27,820 --> 00:06:30,080
He created an image of you here.

118
00:06:30,080 --> 00:06:30,880
OK.

119
00:06:31,310 --> 00:06:35,240
And as you can see IMJ view that sits lay out palms.

120
00:06:35,350 --> 00:06:39,950
So the parent of this interview is going to be this image switcher.

121
00:06:39,950 --> 00:06:46,130
So if I click on this Clearchus here you can see inside this componentry this image is going to be the

122
00:06:46,130 --> 00:06:51,860
parent and the image the view that is going to be inside this image switcher is going to be the child

123
00:06:51,890 --> 00:06:53,390
of this image.

124
00:06:53,420 --> 00:06:54,080
OK.

125
00:06:54,380 --> 00:07:01,220
And inside this and this image suture is actually the child of this linearly out vertical here and this

126
00:07:01,220 --> 00:07:04,060
linearly as vertical is the parent of this image suture.

127
00:07:04,130 --> 00:07:05,620
So hopefully that makes sense.

128
00:07:05,660 --> 00:07:11,300
And if you have any questions please post the discussion in the course and then I'll do my best to answer

129
00:07:11,360 --> 00:07:12,580
all of your questions.

130
00:07:12,770 --> 00:07:16,540
Thank you very much for watching and I'll see you in the next tutorial.

