1
00:00:00,510 --> 00:00:04,490
So now it's actually going inside this uncreate method as you can see here.

2
00:00:04,590 --> 00:00:05,140
OK.

3
00:00:05,140 --> 00:00:09,600
And when I actually are pasting some lines of code here and then I'm going to explain to you what's

4
00:00:09,600 --> 00:00:10,980
going on here.

5
00:00:11,010 --> 00:00:14,500
So as you can see here these are the lines of code that they actually paste that here.

6
00:00:14,520 --> 00:00:15,180
OK.

7
00:00:15,180 --> 00:00:20,890
So here as you can see in line 60 I said that used the animation for Takes suture.

8
00:00:21,030 --> 00:00:24,780
So here I am actually calling these Smurfette that I actually created here.

9
00:00:24,810 --> 00:00:25,340
OK.

10
00:00:25,350 --> 00:00:27,070
Use the animation for texture.

11
00:00:27,120 --> 00:00:32,270
So this if it is going to actually put those animation effects on these or take suture objects.

12
00:00:32,370 --> 00:00:37,410
So as you can see here inside this emulator if I click on this next button or this previous button we

13
00:00:37,410 --> 00:00:39,350
can see those are animation effects.

14
00:00:39,360 --> 00:00:39,740
OK.

15
00:00:39,840 --> 00:00:43,440
So I am passing this take these take which objects to these methods.

16
00:00:43,440 --> 00:00:43,930
OK.

17
00:00:43,980 --> 00:00:46,380
For example this one is for this a sweeter one.

18
00:00:46,620 --> 00:00:52,030
And this one is for this I take sweet two and this one is for these tapes which are free object.

19
00:00:52,050 --> 00:00:52,530
OK.

20
00:00:52,710 --> 00:00:55,700
As you can see if you have free the fence takes three years.

21
00:00:56,040 --> 00:01:01,770
And now I actually paste in some lines of code here and then I'm going to explain to you what's going

22
00:01:01,770 --> 00:01:02,470
on.

23
00:01:02,490 --> 00:01:06,130
So as you can see here these are the lines of code that they actually paste that here.

24
00:01:06,300 --> 00:01:06,860
OK.

25
00:01:06,900 --> 00:01:12,270
And here in line 65 as you can see I actually called this May 5th create takes you by either reading

26
00:01:12,330 --> 00:01:14,720
or the values of the three four takes through each year.

27
00:01:14,730 --> 00:01:18,000
So as you can see here I created this method here as you can see.

28
00:01:18,240 --> 00:01:22,960
And these are for actually accepts two arguments string values and text to each other.

29
00:01:22,980 --> 00:01:28,580
So here are for the first argument I actually assigned this string values Von Schrader.

30
00:01:28,620 --> 00:01:32,610
They actually created inside this class here in line 28 as you can see here.

31
00:01:33,000 --> 00:01:36,650
And for the second argument I actually assigned this text which had object 1.

32
00:01:36,750 --> 00:01:40,310
As you can see and here again I called that method again here.

33
00:01:40,530 --> 00:01:46,440
And for the first argument scientists are string values to and for the second argument I assigned the

34
00:01:46,440 --> 00:01:47,010
value.

35
00:01:47,010 --> 00:01:48,870
This takes three to two.

36
00:01:49,140 --> 00:01:54,750
And here I actually again called this method creates takes you by either reading over the values of

37
00:01:54,750 --> 00:01:56,290
the add a fourth text sweeter.

38
00:01:56,460 --> 00:02:02,130
And here again for the first argument I actually assign string values free and for the second argument

39
00:02:02,190 --> 00:02:04,020
I assigned takes three free.

40
00:02:04,140 --> 00:02:04,880
OK.

41
00:02:05,010 --> 00:02:06,950
So hopefully that makes sense.

42
00:02:07,020 --> 00:02:14,100
And now I'm going to actually pasting some lines of code here and then I'm going to explain to you what's

43
00:02:14,100 --> 00:02:14,950
going on here.

44
00:02:14,970 --> 00:02:15,670
OK.

45
00:02:16,050 --> 00:02:20,430
So as you can see here these are the lines of code that they actually pasted here and here as you can

46
00:02:20,430 --> 00:02:23,920
see first of all I referred to the name of this button here.

47
00:02:23,970 --> 00:02:30,420
Next one object as you can see inside the emulator and here this is our next button and this is our

48
00:02:30,420 --> 00:02:31,330
previous button.

49
00:02:31,350 --> 00:02:31,950
OK.

50
00:02:32,220 --> 00:02:37,300
And here I am actually making this button a listener as you can see listening to the clicks of the use.

51
00:02:37,320 --> 00:02:40,160
So if I click on this button something is going to happen.

52
00:02:40,230 --> 00:02:40,660
OK.

53
00:02:40,740 --> 00:02:43,140
So bit here next one that Stankovic listener.

54
00:02:43,260 --> 00:02:46,590
And here inside Apprentice's we need to specify the context.

55
00:02:46,590 --> 00:02:51,580
OK we need to specify the class that is going to be the listener of the clicks of the user.

56
00:02:51,630 --> 00:02:52,120
OK.

57
00:02:52,130 --> 00:02:55,610
You need to specify the class that this listener belongs to.

58
00:02:55,710 --> 00:02:56,430
OK.

59
00:02:56,430 --> 00:03:01,620
So here again in line 71 I with the name of the city and a private object.

60
00:03:01,620 --> 00:03:06,970
So this is BT and prevent object as you can see that Stokley class and in main activity that this.

61
00:03:07,140 --> 00:03:07,640
OK.

62
00:03:07,860 --> 00:03:14,360
BT are next to that Satanical class and our main activity that this Pythian preach to a listener.

63
00:03:14,480 --> 00:03:21,630
My main activity at this as you can see here and here Pythian our next free set unclick listener main

64
00:03:21,630 --> 00:03:25,870
activity at this and here as you can see PTEN are pretty free.

65
00:03:25,890 --> 00:03:28,420
That's what our calculus and our main activity that is.

66
00:03:28,440 --> 00:03:33,400
OK so now I want to I need to actually as you can see it's not an error.

67
00:03:33,440 --> 00:03:38,220
OK so we cannot actually run our project now because the compiler is actually complaining and we need

68
00:03:38,220 --> 00:03:43,560
to fix something here and here because we are actually making these buttons.

69
00:03:43,650 --> 00:03:49,260
I listen to the clicks of the user we need to actually implement the unclick listener interface in our

70
00:03:49,260 --> 00:03:49,870
class.

71
00:03:49,980 --> 00:03:54,310
Ok so here at the top you need to just type it here implements.

72
00:03:54,500 --> 00:03:59,490
So main activity implements unclick listener interface unclick listener.

73
00:03:59,570 --> 00:04:01,200
OK view that unclick listener.

74
00:04:01,200 --> 00:04:01,640
OK.

75
00:04:01,860 --> 00:04:07,570
So now because this unclick listener interface is actually abstract.

76
00:04:07,790 --> 00:04:13,260
We need to actually implement the abstract methods that are inside of this class and or interface.

77
00:04:13,260 --> 00:04:21,030
So here after the end in calibrates of each of these uncreate Smurfette you know here we need to actually

78
00:04:21,300 --> 00:04:26,820
implement that Anklage my faith here on click Meffert and that he had need to press on until key on

79
00:04:26,820 --> 00:04:28,360
my keyboard.

80
00:04:28,380 --> 00:04:31,890
So now as you can see we can actually overwrite this ugly MF.

81
00:04:31,920 --> 00:04:32,470
OK.

82
00:04:32,670 --> 00:04:36,660
So inside of this Meffert I'm going to actually paste in some lines of code and then I'm going to explain

83
00:04:36,660 --> 00:04:38,320
to you what's going on here.

84
00:04:38,340 --> 00:04:43,080
So as you can see here I actually pasted this switch statement here as you can see.

85
00:04:43,080 --> 00:04:43,580
OK.

86
00:04:43,770 --> 00:04:47,890
So this is the statement that actually pasted here inside of this Uncle Fred.

87
00:04:47,940 --> 00:04:48,550
OK.

88
00:04:48,850 --> 00:04:52,380
And now when I explain to you what's going on here.

89
00:04:52,380 --> 00:04:55,120
First of all I actually created a switch statement.

90
00:04:55,180 --> 00:05:00,890
So each and inside the apprentice's I actually fed to the name of this object that we actually to receive

91
00:05:00,920 --> 00:05:04,030
as an argument view OK this object is of type view.

92
00:05:04,040 --> 00:05:10,060
So remember view the view class is actually the superclass of all of these components in actually and

93
00:05:10,090 --> 00:05:10,760
right stick.

94
00:05:10,830 --> 00:05:11,260
OK.

95
00:05:11,450 --> 00:05:16,790
So if you want to actually differentiate between the buttons OK between these different buttons I can

96
00:05:16,790 --> 00:05:20,510
actually use this view object in order to differentiate between those buttons.

97
00:05:20,600 --> 00:05:23,600
When the user clicks on one of those buttons.

98
00:05:23,600 --> 00:05:24,040
OK.

99
00:05:24,170 --> 00:05:26,920
So here I can just type in each that gets ID.

100
00:05:26,960 --> 00:05:34,340
OK so here and just switching between the ideas that are related to our objects so get to the bottom.

101
00:05:34,360 --> 00:05:36,580
OK so we don't get ID.

102
00:05:36,860 --> 00:05:38,930
And here inside is a switch statement.

103
00:05:38,960 --> 00:05:48,470
I am saying that if the ID of our view as we can see it if the idea of our V object is PTEN next one

104
00:05:48,740 --> 00:05:50,890
then execute this line of code here.

105
00:05:50,960 --> 00:05:54,820
It takes Screecher want that show next here as you can see break.

106
00:05:55,160 --> 00:06:01,550
And here we have case art that idea that and Livan takes through each one that show previous.

107
00:06:01,550 --> 00:06:05,760
So as you can see here in the emulator we have these values here.

108
00:06:05,780 --> 00:06:10,160
And if I click Next you can see the next value.

109
00:06:10,160 --> 00:06:14,190
And if I click on previous As you can see we can see the previous value OK.

110
00:06:14,630 --> 00:06:21,860
And here again if the value of this ID is a bit here next to then execute this line of code here takes

111
00:06:21,870 --> 00:06:22,520
three to two.

112
00:06:22,510 --> 00:06:24,370
That's your next break.

113
00:06:24,530 --> 00:06:29,710
And if the value of this idea is PTEN P2 takes each to the previous bridge.

114
00:06:29,950 --> 00:06:30,280
OK.

115
00:06:30,280 --> 00:06:33,350
And as you can see here we have another text we show here.

116
00:06:33,470 --> 00:06:39,620
And if I click on next and see the next value and if I click on previous You can see the previous value.

117
00:06:39,680 --> 00:06:45,800
And here again we have another case statement case are that ID that's BTA next three take Sutor free.

118
00:06:45,800 --> 00:06:54,180
That's your next break case or that Id that BT and briefly take take to read your previous break.

119
00:06:54,200 --> 00:06:59,360
So here as you can see if you scroll down you can see that you have another take switcher and if we

120
00:06:59,360 --> 00:07:04,740
click Next we can see this value the next value completely ASBI level up of course.

121
00:07:04,790 --> 00:07:09,770
And if I click on a previous We can see the previous value complete objective see that of course.

122
00:07:09,770 --> 00:07:10,680
OK.

123
00:07:10,820 --> 00:07:12,860
So hopefully that makes sense.

124
00:07:13,040 --> 00:07:13,640
OK.

125
00:07:13,880 --> 00:07:20,290
And I think that's enough for this application and it's actually not our project and see what happens.

126
00:07:20,590 --> 00:07:26,900
OK so now as you can see our application is actually running on this emulator.

127
00:07:26,960 --> 00:07:27,540
OK.

128
00:07:27,740 --> 00:07:29,110
And here you can see these values.

129
00:07:29,120 --> 00:07:34,070
And if I actually click on the spot in here you can see these values actually are changing your cake.

130
00:07:34,400 --> 00:07:39,300
And here here and actually if you scroll down here I can see these values change.

131
00:07:39,440 --> 00:07:44,090
But as you can see here these buttons are not at the center of this screen.

132
00:07:44,090 --> 00:07:44,520
OK.

133
00:07:44,690 --> 00:07:47,810
So here are they're not actually horizontally centered.

134
00:07:47,900 --> 00:07:50,220
They are actually horizontally centered.

135
00:07:50,240 --> 00:07:56,930
But because if actually signed this we actually when we actually selected these linear layouts that

136
00:07:56,930 --> 00:08:05,190
actually hold these image buttons of actually assigned the value wrapped content for these up linearly.

137
00:08:05,240 --> 00:08:12,500
OK so if we actually change these values for the new outfits and for that they are for the layout and

138
00:08:12,500 --> 00:08:15,340
for the layout height as you can see the assigned lap content.

139
00:08:15,350 --> 00:08:15,940
OK.

140
00:08:16,340 --> 00:08:21,420
And if we actually change this value it will match parent.

141
00:08:21,440 --> 00:08:22,560
Let's see what happens.

142
00:08:24,090 --> 00:08:25,740
As you can see match parent.

143
00:08:25,740 --> 00:08:29,700
And now let's actually do our project again and see what happens.

144
00:08:31,670 --> 00:08:35,410
And now as you can see these two buttons are actually at the center.

145
00:08:35,420 --> 00:08:38,870
Actually there are they are horizontally centered on the screen.

146
00:08:38,870 --> 00:08:39,310
OK.

147
00:08:39,500 --> 00:08:45,320
And that's because this linearly out now is actually that lay outfits and the height of this linearly

148
00:08:45,330 --> 00:08:49,930
out is match parent OK and match parent means the parent of this linearly.

149
00:08:49,940 --> 00:08:54,180
So that part of this linearly out is this linearly outwards.

150
00:08:54,200 --> 00:08:54,650
OK.

151
00:08:54,920 --> 00:09:01,800
So here because we actually is trying to devalue match parents for these outfits and for the length

152
00:09:01,880 --> 00:09:09,320
height of these linearly owls now because these two actually assigned the values centered horizontal

153
00:09:09,320 --> 00:09:16,820
for the gravity of this linearly and vertical the components that are inside of this linearly are going

154
00:09:16,820 --> 00:09:23,070
to be actually horizontally centered inside this linearly and actually horizontal OK.

155
00:09:23,150 --> 00:09:30,830
But when you actually assigned the value wrapped content to the left and to the height of this linearly

156
00:09:30,830 --> 00:09:34,090
or horizontal or the values are going to be centered.

157
00:09:34,160 --> 00:09:34,760
OK.

158
00:09:34,850 --> 00:09:38,780
Inside that specific linearly or horizontal okay but we cannot.

159
00:09:38,810 --> 00:09:44,220
But when we actually got our application like this as you can see you cannot actually see that that

160
00:09:44,220 --> 00:09:50,070
they are centered inside the linearly or horizontal but they are not centered in sight our screen.

161
00:09:50,220 --> 00:09:56,050
OK but if we actually change that value that they have to feed and the height too much apparent.

162
00:09:56,150 --> 00:09:58,980
Now they are actually centered horizontally in the screen.

163
00:09:59,170 --> 00:09:59,740
OK.

164
00:10:00,050 --> 00:10:03,840
So if I actually decide actually select the other linearly out.

165
00:10:03,890 --> 00:10:04,470
OK.

166
00:10:04,730 --> 00:10:05,200
OK.

167
00:10:05,300 --> 00:10:11,990
And now I can actually change this outfit to to actually match a parent.

168
00:10:12,230 --> 00:10:14,830
And then they have height to match parent.

169
00:10:14,840 --> 00:10:15,540
OK.

170
00:10:15,650 --> 00:10:20,790
I actually assigned the value of match parent for outfits and de-value Mattapan and for that they have

171
00:10:20,800 --> 00:10:23,670
height for these two linear layouts here.

172
00:10:23,690 --> 00:10:24,230
OK.

173
00:10:24,470 --> 00:10:29,460
And now if I actually select all of these linearly out horizontally as you can see here the left with

174
00:10:29,480 --> 00:10:34,940
as much apparent and the height is much apparent And as you can see here we cannot see Aldo's image

175
00:10:34,940 --> 00:10:36,660
buttons any more here on this layer.

176
00:10:36,680 --> 00:10:37,060
OK.

177
00:10:37,160 --> 00:10:40,790
But if we actually did not our project here let's see what happens.

178
00:10:42,230 --> 00:10:47,900
And now as you can see our application is running on the simulator and we can see that these image buttons

179
00:10:47,900 --> 00:10:52,820
are actually centered horizontally correctly OK on our inside the screen.

180
00:10:52,820 --> 00:10:53,300
OK.

181
00:10:53,390 --> 00:10:58,370
And here we can see these values and here you can actually click on these image buttons in order to

182
00:10:58,370 --> 00:10:59,880
change these values.

183
00:10:59,900 --> 00:11:00,370
OK.

