1
00:00:00,680 --> 00:00:06,350
Hire everyone in this story we're going to go ahead and we're going to create a new activity called

2
00:00:06,440 --> 00:00:12,710
update martial arts activity in order to allow the users to update our specific martial art objects.

3
00:00:12,710 --> 00:00:15,810
That is safe to say to this database.

4
00:00:16,130 --> 00:00:19,950
So here open it up for them and then offered this job for that.

5
00:00:20,030 --> 00:00:23,330
And he opened this actually the first package.

6
00:00:23,360 --> 00:00:24,430
Right click on it.

7
00:00:24,500 --> 00:00:29,300
New activity empty activity.

8
00:00:29,480 --> 00:00:37,760
So the name of this activity is going to be up date martial arts activity.

9
00:00:37,900 --> 00:00:40,890
So here you can see that it's going to create a lay out for us.

10
00:00:40,900 --> 00:00:45,580
It's going to generate Ali outfight for us called Actually with the Underland update Underland Marshall

11
00:00:45,610 --> 00:00:46,670
Underland art.

12
00:00:46,990 --> 00:00:48,870
So it is not going to be a lot of activity.

13
00:00:48,880 --> 00:00:53,700
Backwards compatibility enabled the package and then click on finish.

14
00:00:54,100 --> 00:00:55,820
So let's wait a little bit here.

15
00:00:55,900 --> 00:01:00,560
So now that this activity is created this update activity is created.

16
00:01:00,570 --> 00:01:06,980
Again we are going to design the user interface programmatically because we do not know how many art

17
00:01:07,030 --> 00:01:09,110
optics are needed to be updated.

18
00:01:09,130 --> 00:01:13,570
OK we do not know how many Marshall objects are saved to escalate database.

19
00:01:13,840 --> 00:01:17,680
So we are going to design the user interface programmatically.

20
00:01:17,680 --> 00:01:23,020
So as you can see we have this update marshal activity less publicly tried to stop here in order to

21
00:01:23,020 --> 00:01:26,630
make this area a wider.

22
00:01:26,770 --> 00:01:31,700
So here first of all we need to have a reference to database handler.

23
00:01:31,750 --> 00:01:32,180
OK.

24
00:01:32,260 --> 00:01:34,820
So inside this class update Mosteller activity.

25
00:01:35,050 --> 00:01:41,500
I'm going to just type in a private database handler database handler semicolon.

26
00:01:41,650 --> 00:01:42,530
Let's go into this.

27
00:01:42,530 --> 00:01:48,460
Uncreate method and let's initialize this valuable database handler assignment operator new database

28
00:01:48,460 --> 00:01:51,990
handler and we are going to pass the context.

29
00:01:52,150 --> 00:01:58,140
So the context is going to be a great martial art activity that this right semicolon.

30
00:01:58,570 --> 00:02:05,320
And here we are going to actually call the modify user interface method here again and you're going

31
00:02:05,320 --> 00:02:06,720
to actually create it here.

32
00:02:06,730 --> 00:02:16,140
So modify user interface modify user interface and then put up at a fancy Pattis is your semicolon.

33
00:02:16,330 --> 00:02:21,670
So now let's go inside this class after the curly brace of this uncreate method and before the ending

34
00:02:21,700 --> 00:02:26,310
curly brace of this class we are going to create this method because we want to.

35
00:02:26,350 --> 00:02:29,130
These are designed to use an interface programmatically.

36
00:02:29,140 --> 00:02:30,580
So again private.

37
00:02:30,580 --> 00:02:37,200
So now let's specify the return type of the Smurfette which is void and the name of this method is modify

38
00:02:37,220 --> 00:02:42,580
the user interface and then put a pair of practice's here and then open and close the Smurfette by using

39
00:02:42,580 --> 00:02:45,250
these curly braces inside the Smurfit.

40
00:02:45,250 --> 00:02:52,000
Let's create an array list of martial art objects so that they can hear aerialist and instead the angle

41
00:02:52,000 --> 00:02:56,820
brackets we need to specify the type of the objects that we want to put inside this aerialist.

42
00:02:56,830 --> 00:03:05,760
So it is martial art and the name of this actually is going into martial art objects martial art objects

43
00:03:06,810 --> 00:03:08,350
assignment operator.

44
00:03:08,400 --> 00:03:14,130
So here we have an instance that is actually of type database handler right.

45
00:03:14,130 --> 00:03:21,900
We have a reference to the state of his handler instance so we can't say databus handler that return

46
00:03:22,380 --> 00:03:24,760
all martial art objects semicolon.

47
00:03:25,020 --> 00:03:26,740
And here I can say.

48
00:03:26,880 --> 00:03:30,720
So let me create a new line here so that you can see this line of code there.

49
00:03:30,840 --> 00:03:40,170
Now let's create an if statement so if Marshal or objects is actually that size if the number of elements

50
00:03:40,440 --> 00:03:46,950
that are inside of this at a radius actually is greater than zero and then I can open and close this

51
00:03:46,950 --> 00:03:49,290
if statement but using the curly braces.

52
00:03:49,290 --> 00:03:54,240
So here let's create a scroll view scroll view scroll view.

53
00:03:54,400 --> 00:04:00,640
Assignment operator new scroll view and inside Apprentice's meaning to press the context.

54
00:04:00,810 --> 00:04:06,530
So the context is update Marshlack activity that this update Marshlack activity.

55
00:04:06,600 --> 00:04:08,490
This semicolon.

56
00:04:08,670 --> 00:04:14,330
Now let's create a great layout so you are already familiar with discretely out in the app.

57
00:04:14,330 --> 00:04:22,250
Actually in the animal quiz app application I taught you how to use grittily out into the user interface.

58
00:04:22,500 --> 00:04:29,720
Actually by using the Examen quotes but here we want to create are greatly out by using Java codes programmatically

59
00:04:29,730 --> 00:04:30,410
right.

60
00:04:30,480 --> 00:04:33,750
So now let's specify the name of discretely out here.

61
00:04:33,780 --> 00:04:41,560
Assignment operator new grid layout and we need to pass again the context update motional activity that

62
00:04:41,620 --> 00:04:43,960
this semicolon.

63
00:04:44,280 --> 00:04:50,250
And here we need to specify the number of rows that we want to have inside our greedily.

64
00:04:50,280 --> 00:04:57,990
So just they've been here greatly out it that sets low count.

65
00:04:58,040 --> 00:05:04,680
So here for the count I can just refer to this Matia that objects that size.

66
00:05:04,890 --> 00:05:13,500
OK so the number of elements that are inside of these are a list of objects is going to specify the

67
00:05:13,520 --> 00:05:16,610
number of rows that we have inside are really out.

68
00:05:16,880 --> 00:05:17,360
OK.

69
00:05:17,600 --> 00:05:25,920
So now now actually we need to specify that number of columns that we want to have inside our great

70
00:05:26,000 --> 00:05:26,460
layout.

71
00:05:26,510 --> 00:05:33,960
So I can't say great lay out that sets column count OK here.

72
00:05:34,050 --> 00:05:34,880
The number of column.

73
00:05:34,980 --> 00:05:39,020
So the number of columns is going to be actually number 5.

74
00:05:39,330 --> 00:05:41,890
We want we need a column for the ID.

75
00:05:42,030 --> 00:05:43,810
The idea of the motion of the object.

76
00:05:43,830 --> 00:05:47,090
We need a column for the name of the martial art object.

77
00:05:47,130 --> 00:05:48,750
We need a column for that.

78
00:05:48,790 --> 00:05:56,080
Actually the price of that Marshall object and we need another color for the color of that monster object.

79
00:05:56,280 --> 00:06:04,860
And we also need actually another color for the button that is going to actually let the user to update

80
00:06:05,250 --> 00:06:08,500
or modify that specific martial art object right.

81
00:06:08,520 --> 00:06:12,240
So not just that this is our update martial art activity class.

82
00:06:12,240 --> 00:06:12,570
Right.

83
00:06:12,600 --> 00:06:21,500
So inside each row if you have to have five columns and are the name price color and there and a button

84
00:06:21,500 --> 00:06:28,030
for actually allowing the user to update or modify that specific motion or object.

85
00:06:28,110 --> 00:06:32,620
So that's why we want to have five columns inside our row.

86
00:06:32,640 --> 00:06:41,370
Now let's create an array of text views because we want to put our IDs inside a text view right so that

87
00:06:41,370 --> 00:06:45,860
history is going to be the representation of all of the ID of each motional object.

88
00:06:45,870 --> 00:06:52,650
So I see text view and then put a pair of brackets here in order to specify that this is going to be

89
00:06:52,650 --> 00:07:02,640
an array of takes views and the name of this part is going to be an ID text views ID text views assignment

90
00:07:02,640 --> 00:07:05,930
operator new text view.

91
00:07:06,450 --> 00:07:14,080
And then here inside the brackets I need to specify the size of this of this at a right.

92
00:07:14,110 --> 00:07:21,250
I need to specify that how many elements how many actually takes use that you want to have inside array.

93
00:07:21,490 --> 00:07:27,550
So if we want to have actually the number of elements of our emotional objects.

94
00:07:27,610 --> 00:07:36,310
OK so much for objects that size for each monster that object we need to have an ID right because each

95
00:07:36,310 --> 00:07:38,640
martial artist has a specific ID.

96
00:07:38,740 --> 00:07:46,390
So we might we want to have the size of this object to be the number of elements of this arey.

97
00:07:46,780 --> 00:07:49,570
So here after this line of code I can't say.

98
00:07:49,780 --> 00:07:53,740
So now we want to create a two dimensional array.

99
00:07:53,740 --> 00:07:57,700
Actually it is going to be an array of edit texts.

100
00:07:57,700 --> 00:07:59,360
So let's create that here.

101
00:07:59,480 --> 00:08:01,200
And it takes just typing here.

102
00:08:01,250 --> 00:08:06,600
It takes put a pair of brackets here and put another proft brackets here.

103
00:08:06,610 --> 00:08:11,970
It is going to be a two dimensional array and add a that actually contains abbes.

104
00:08:11,980 --> 00:08:15,780
So now let's specify the name of these two dimensional at 8.

105
00:08:15,850 --> 00:08:26,360
It is going to be EDT name's prices colors names places and colors.

106
00:08:26,480 --> 00:08:28,050
It's more meaningful in this way.

107
00:08:28,070 --> 00:08:30,120
Assignment operator.

108
00:08:30,480 --> 00:08:35,910
So now we need to say new edit text this is going to be a two dimensional array right.

109
00:08:36,080 --> 00:08:39,820
So we need to specify the size of the first at a.

110
00:08:39,910 --> 00:08:40,180
OK.

111
00:08:40,180 --> 00:08:44,800
The size of the elements that you want to put in in there first.

112
00:08:45,020 --> 00:08:52,830
So the size is going to be again Marshall objects that size right now for the second actually.

113
00:08:53,000 --> 00:08:55,210
Are they here for this one.

114
00:08:55,220 --> 00:08:57,650
This is this is going to be at a site.

115
00:08:57,680 --> 00:08:59,830
This big area inside is one.

116
00:09:00,140 --> 00:09:05,960
So here for this one that we need to specify the exact number of elements it is going to be free.

117
00:09:05,960 --> 00:09:09,470
Notice that we have names Price's colors.

118
00:09:09,650 --> 00:09:16,520
So it actually takes for the name we need and it takes for the price and we need another and it takes

119
00:09:16,520 --> 00:09:17,400
for the colors.

120
00:09:17,450 --> 00:09:17,990
Right.

121
00:09:18,020 --> 00:09:20,340
So at the end of your statement just put a semicolon here.

122
00:09:20,360 --> 00:09:25,310
Let me create a new line here so that you can see this line of code better.

123
00:09:25,670 --> 00:09:34,040
Now after this line of code I can't say so remember here I told you that in each row you must have a

124
00:09:34,040 --> 00:09:40,000
button in order to allow the user to modify or update that specific martial art object.

125
00:09:40,010 --> 00:09:42,870
So we need to also have an array of buttons.

126
00:09:42,890 --> 00:09:48,350
So after this line of code I can see a button I put a pair of brackets in order to specify that this

127
00:09:48,350 --> 00:09:56,060
is going to be an array of buttons and the name of this variable is going to be modified partons modify

128
00:09:56,810 --> 00:10:05,110
buttons assignment operator right new button.

129
00:10:05,800 --> 00:10:06,280
OK.

130
00:10:06,430 --> 00:10:12,100
And inside the brackets meaning to specify the size all you need to specify the number of elements that

131
00:10:12,100 --> 00:10:13,540
this area is going to hold.

132
00:10:13,630 --> 00:10:19,930
So again it is going to be modular objects that size for each Marshall object if you want to have a

133
00:10:19,930 --> 00:10:24,500
modified button an update button right after this and of course I can't say.

134
00:10:24,760 --> 00:10:30,930
So we need to also be notified that vendor use that actually to interacts with these modify buttons.

135
00:10:30,990 --> 00:10:34,170
If you want to be notified right this class should be notified.

136
00:10:34,390 --> 00:10:40,570
So in order to do that first this update module activity class must implement the view that Uncle Clisson

137
00:10:40,580 --> 00:10:41,230
or interface.

138
00:10:41,230 --> 00:10:47,070
So just scroll to the top here it says update motional activity X pens app compact activity.

139
00:10:47,110 --> 00:10:55,850
And then here just typing implements view that unclick listener because the school has now implements

140
00:10:56,300 --> 00:10:57,160
this interface.

141
00:10:57,230 --> 00:11:03,020
We must actually implement or we must provide an implementation for the method that we have in say the

142
00:11:03,020 --> 00:11:09,620
view that we consumer interface just scroll down here and before the end in calibrates of this class

143
00:11:09,620 --> 00:11:12,720
marshal activity just like in here unclick.

144
00:11:13,180 --> 00:11:14,300
That's it.

145
00:11:14,460 --> 00:11:14,720
Right.

146
00:11:14,720 --> 00:11:20,420
So we have this unclick my faith and this method is going to be executed whenever the user interacts

147
00:11:20,480 --> 00:11:22,030
with that modified button.

148
00:11:22,370 --> 00:11:22,820
OK.

149
00:11:23,000 --> 00:11:27,410
So if we also have this argument which is going which is the user interface component or that specific

150
00:11:27,410 --> 00:11:30,440
button that is clicked or touched.

151
00:11:30,530 --> 00:11:32,390
So let's go up here.

152
00:11:32,930 --> 00:11:38,720
Now after descent of what inside this method right inside this modify user interface method after creating

153
00:11:38,720 --> 00:11:42,830
this idea is this idea of buttons here I can't say.

154
00:11:42,920 --> 00:11:51,800
So here we want to actually access the width of the screen of the user's device right.

155
00:11:51,920 --> 00:11:55,040
So in order to do that you need to create a variable of type point.

156
00:11:55,160 --> 00:12:03,630
So I can say point the name of this variable is going to be screen size screen size assignment operator

157
00:12:04,080 --> 00:12:08,240
new point by semicolon.

158
00:12:08,330 --> 00:12:09,910
Now they've been here.

159
00:12:09,920 --> 00:12:19,640
Get window manager that get default display that get size and now you need to pass an argument to this

160
00:12:19,670 --> 00:12:20,430
get seismic.

161
00:12:20,450 --> 00:12:26,640
So that is going to assign the size of the screen to this screen size body of it.

162
00:12:26,690 --> 00:12:30,930
So I'm going to actually pass this screen size to this effect.

163
00:12:31,010 --> 00:12:38,540
And now this screen size variable holds there actually the size of the screen of the user's device.

164
00:12:38,560 --> 00:12:44,080
So in this way I can actually access the width of this screen but let's create a value of that integer

165
00:12:44,230 --> 00:12:52,690
int and then of this by the body's screen with assignment operator and I can refer to this screen size

166
00:12:52,690 --> 00:12:56,940
variable which is a point that X semicolon.

167
00:12:57,100 --> 00:13:01,050
Now this variable holds the width of this screen.

168
00:13:01,090 --> 00:13:08,900
Let's create a counter variable so in counter as I mean operator zero semicolon.

169
00:13:09,260 --> 00:13:12,030
Now let's create a for loop for.

170
00:13:12,560 --> 00:13:19,200
Now I want to iterate over each marshal or object that we have inside this at least right marginal objects.

171
00:13:19,220 --> 00:13:27,900
So I can say actually martial arts martial art object martial arts object.

172
00:13:28,040 --> 00:13:32,180
So this is actually a valuable right now here I need to put a call in here.

173
00:13:32,330 --> 00:13:35,290
And then after this call I can refer to this at a.

174
00:13:35,300 --> 00:13:36,730
Martial art objects.

175
00:13:36,860 --> 00:13:43,590
So you know that this fall in love here is going to actually execute for each martial artist.

176
00:13:43,610 --> 00:13:48,310
This fall is going to be executed for each motion of objects that we have inside this at least.

177
00:13:48,380 --> 00:13:49,010
Right.

178
00:13:49,370 --> 00:13:55,030
So inside this for loop we want to populate the areas that we created here.

179
00:13:55,030 --> 00:13:56,840
Look at these areas here.

180
00:13:56,900 --> 00:14:02,140
So for example in number 47 We created an array of type text view here.

181
00:14:02,180 --> 00:14:08,540
It takes views and they said that the number of elements that this area can accept is actually the size

182
00:14:08,720 --> 00:14:10,390
of the multiple objects frailest.

183
00:14:10,420 --> 00:14:10,830
Right.

184
00:14:10,880 --> 00:14:12,630
Give me a specified this are here.

185
00:14:12,740 --> 00:14:16,670
But we did not populated populate this area yet.

186
00:14:16,880 --> 00:14:23,240
So it is for a loop here because this is going to be executed for each Monserrat object that we have

187
00:14:23,240 --> 00:14:24,900
inside these multiple objects array.

188
00:14:24,960 --> 00:14:32,770
And it is actually we want to create a text view for the ID of each monstrous object.

189
00:14:32,780 --> 00:14:35,010
So let's refer to this right here.

190
00:14:35,020 --> 00:14:39,490
All it takes to use and let's put a pair of brackets here.

191
00:14:39,510 --> 00:14:46,350
So I want to go inside the index zero of this array and I want to assign a value or text view to the

192
00:14:46,350 --> 00:14:48,070
index zero of this.

193
00:14:48,300 --> 00:14:49,830
So index 0.

194
00:14:49,860 --> 00:14:53,870
So why should I actually put index 0 here.

195
00:14:53,970 --> 00:14:58,920
We actually created a variable of type counter here.

196
00:14:58,980 --> 00:15:04,560
So in this way because this for loop this folly in loop here is going to be executed for each Montral

197
00:15:04,560 --> 00:15:11,970
object that we have inside this at least in this way we can populate or Aurelia's or takes you actually

198
00:15:11,970 --> 00:15:13,240
the artist view a.

199
00:15:13,710 --> 00:15:18,220
And if we can put a text view for each Marshall object.

200
00:15:18,250 --> 00:15:22,890
So instead of passing the value 0 that's passed the value counter here.

201
00:15:23,140 --> 00:15:23,730
Right.

202
00:15:23,770 --> 00:15:32,200
And because this counter here should be must be actually incremented after executing after each execution

203
00:15:32,200 --> 00:15:33,340
of this for loop here.

204
00:15:33,430 --> 00:15:35,820
Let's put it here so that we don't forget it.

205
00:15:35,950 --> 00:15:41,140
So just at the design of coaches they can here a counter plus plus a.

206
00:15:41,380 --> 00:15:43,010
Right now.

207
00:15:43,170 --> 00:15:49,370
So for the first time that this will appear is going to be executed the first object that we have inside

208
00:15:49,370 --> 00:15:49,830
is at.

209
00:15:49,860 --> 00:15:50,170
Right.

210
00:15:50,180 --> 00:15:51,360
This is our latest.

211
00:15:51,460 --> 00:15:55,160
So now we have this counter the counter is now zero.

212
00:15:55,360 --> 00:15:56,180
Right.

213
00:15:56,200 --> 00:16:00,280
So if we passed it the counter here which means index number 0.

214
00:16:00,340 --> 00:16:07,940
I want to pass over to assign a text view to the index number zero of this it takes views.

215
00:16:08,230 --> 00:16:13,860
So assignment operator Miyu takes you right.

216
00:16:13,870 --> 00:16:20,830
So here I just need to pass the context which is this one update multiple activity to this semicolon.

217
00:16:20,950 --> 00:16:23,460
Let me tell you a very important point.

218
00:16:23,470 --> 00:16:25,780
This is very important Pay attention here.

219
00:16:25,830 --> 00:16:27,480
Look at this great out here.

220
00:16:27,490 --> 00:16:29,390
We have a gradely right.

221
00:16:29,500 --> 00:16:36,490
And we are going to put our great grittily out inside this scroll you village that we haven't still

222
00:16:36,580 --> 00:16:41,070
put the codes in order to actually put the crudely out inside this scroll.

223
00:16:41,080 --> 00:16:47,260
But for now just know that we are going to do that later and notice that we have here this line of code

224
00:16:47,260 --> 00:16:48,220
in line number 44.

225
00:16:48,220 --> 00:16:56,200
I said that you are going to have the size of a Marshall object that is going to be the number of elements

226
00:16:56,200 --> 00:17:01,600
or the number of rows that we have inside discretely out and inside each you know we are going to have

227
00:17:01,600 --> 00:17:03,250
five columns.

228
00:17:03,250 --> 00:17:07,870
The first column is going to be for the ID of that Monserrat object.

229
00:17:07,870 --> 00:17:08,750
Right.

230
00:17:08,890 --> 00:17:15,820
So this means that here when I actually create a new text view and I put it inside the index number

231
00:17:15,820 --> 00:17:26,420
zero of this ID takes viewers at a later event when I want to actually put this text view inside are

232
00:17:26,930 --> 00:17:34,460
greatly out this text is going to be inside the index number one actually is that column number 1 in

233
00:17:34,610 --> 00:17:38,500
so the column number one of this Goodley are automatically OK.

234
00:17:38,570 --> 00:17:42,730
This process is going to be executed automatically.

235
00:17:42,800 --> 00:17:45,000
So after this thing of course of not just don't vote.

236
00:17:45,040 --> 00:17:52,010
If it's actually a little bit complex don't worry I'm going to explain it more in a later here.

237
00:17:52,080 --> 00:17:54,390
Don't worry just like these courts here.

238
00:17:54,620 --> 00:17:59,310
But if you have any questions you can post the discussion in the course or you can message me in with

239
00:17:59,350 --> 00:18:02,110
me and then I do my best to answer all of your questions.

240
00:18:02,120 --> 00:18:09,360
So here we created a text view and we assign it to the index counter of this idea takes use.

241
00:18:09,410 --> 00:18:15,110
So here instead of saying that the name of this variable is counted let's change it to index its more

242
00:18:15,110 --> 00:18:16,570
meaningful index.

243
00:18:16,880 --> 00:18:20,060
Let's also change this counter to index.

244
00:18:20,260 --> 00:18:24,720
And here let's say index plus plus index plus plus.

245
00:18:24,730 --> 00:18:26,310
So that's it.

246
00:18:26,320 --> 00:18:36,300
Now I can say so let me tell you that each text view has a gravity attribute which is going to specify

247
00:18:36,690 --> 00:18:42,000
the position of the text of that takes you inside the parent.

248
00:18:42,000 --> 00:18:44,520
So we have a text view which is the parent.

249
00:18:44,640 --> 00:18:45,200
Right.

250
00:18:45,360 --> 00:18:50,590
And we have a text inside that takes a view which is going to be the child of that takes you right.

251
00:18:50,610 --> 00:18:57,410
So I want to center the text of that text view on the center at the center of the text view OK.

252
00:18:57,600 --> 00:19:02,740
So I can say Id takes views and I put a pair of brackets here.

253
00:19:02,800 --> 00:19:09,660
Index that set gravity write that says gravity.

254
00:19:09,660 --> 00:19:16,100
And then I can say gravity with capital G that center.

255
00:19:16,290 --> 00:19:17,450
That's it.

256
00:19:17,440 --> 00:19:23,690
I want to center the text of that takes you inside that takes you right the habit takes you the parent.

257
00:19:23,700 --> 00:19:26,700
We have the text insert atus view which is the choice.

258
00:19:26,790 --> 00:19:33,930
So you want to position the child in the center at the at the center of the takes of you so that's it

259
00:19:34,080 --> 00:19:35,310
gravity that's it.

260
00:19:35,620 --> 00:19:40,810
So now it's time to specify the text of that takes you right.

261
00:19:40,870 --> 00:19:50,270
I can see why it takes views and then they just put a pair of brackets index that said text so the text

262
00:19:50,360 --> 00:19:53,600
is going to be martial art object.

263
00:19:53,600 --> 00:19:56,300
So we have this martial object valuable right.

264
00:19:56,450 --> 00:19:58,500
That gets a D gets.

265
00:19:58,510 --> 00:20:05,940
Marshall ID and because this is of type integer they get Marshall the idea if it is going to return

266
00:20:06,320 --> 00:20:12,740
a value of an integer and this takes and if it needs a value of type String we must convert this value

267
00:20:12,740 --> 00:20:13,860
twice think value.

268
00:20:13,860 --> 00:20:18,330
So here we just need to put up the contamination OPERATOR Two coats.

269
00:20:18,450 --> 00:20:18,810
OK.

270
00:20:18,970 --> 00:20:22,370
Marshall object that did that Id plus two calls.

271
00:20:22,380 --> 00:20:24,140
So now it is converted to a string value.

272
00:20:24,160 --> 00:20:31,240
And now we can assign it this value to the text actually a property of this ID takes you index.

273
00:20:31,320 --> 00:20:41,130
So now after this line of code we need to specify actually the text actually the text that we have that

274
00:20:41,130 --> 00:20:43,740
you are going to have inside this edit takes great.

275
00:20:43,780 --> 00:20:45,340
This is going to be a two dimensional array.

276
00:20:45,360 --> 00:20:45,910
Right.

277
00:20:46,230 --> 00:20:52,230
So we need to create an edit text for the name of the monster that we need to create another edit text

278
00:20:52,230 --> 00:20:54,970
for the price of that market.

279
00:20:55,170 --> 00:20:59,580
And we need to create another taste for the color of that martial art.

280
00:20:59,610 --> 00:21:03,750
So here you can see these two dimensional art.

281
00:21:03,780 --> 00:21:04,840
Right.

282
00:21:04,950 --> 00:21:06,640
I can refer to that dimension or a.

283
00:21:06,640 --> 00:21:07,310
Here it is.

284
00:21:07,320 --> 00:21:12,560
He names places and colors and he just put a pair of brackets.

285
00:21:12,570 --> 00:21:14,720
So this is going to be the first arii.

286
00:21:14,730 --> 00:21:15,360
Right.

287
00:21:15,660 --> 00:21:17,510
So now we have this index here.

288
00:21:17,520 --> 00:21:26,240
So if you want to go to actually index number to zero so just put poost put a value index here because

289
00:21:26,810 --> 00:21:27,860
this is the first time.

290
00:21:27,860 --> 00:21:31,720
For example assume that this is the first time that this for loop is going to be executed.

291
00:21:31,850 --> 00:21:36,690
So we just passed the value index here and now currently the value of the index is zero right.

292
00:21:36,710 --> 00:21:38,640
So I just passed the index here.

293
00:21:38,880 --> 00:21:41,390
So vatos index mean he here this index.

294
00:21:41,390 --> 00:21:44,850
So I told you we have an array of arrays.

295
00:21:45,230 --> 00:21:45,740
Right.

296
00:21:45,740 --> 00:21:50,780
So its going to go inside the first Aure inside this area here.

297
00:21:51,140 --> 00:21:56,590
Index and we are going to actually go ahead and we are going to just put a pair of brackets here.

298
00:21:56,870 --> 00:21:58,800
And we are going to specify.

299
00:21:59,210 --> 00:22:05,790
So I told you that we have three actually which are three elements in each array here.

300
00:22:05,960 --> 00:22:06,440
Right.

301
00:22:06,440 --> 00:22:07,730
So this is the first array.

302
00:22:07,910 --> 00:22:11,610
And inside that first array we are going to have three elements.

303
00:22:11,690 --> 00:22:18,220
So the first element is going to be 0 right which is going to specify the name actually the name ID

304
00:22:18,230 --> 00:22:21,140
text for their Monserrat object.

305
00:22:21,740 --> 00:22:23,940
And I put an assignment operator here.

306
00:22:24,070 --> 00:22:33,190
Now you edit text and I just adjacent to pass the context update marshal activity that this.

307
00:22:33,530 --> 00:22:36,110
So here lets put a semicolon at the end of our statement.

308
00:22:36,110 --> 00:22:45,410
Let me show you that here we created an edited X for the first A-Day and inserted a for the first element

309
00:22:45,980 --> 00:22:46,950
right.

310
00:22:47,030 --> 00:22:52,570
We created it we created an edit text for that here which is going to be for the name.

311
00:22:52,570 --> 00:22:57,850
And that's why the name of this valuable is names prices and colors.

312
00:22:57,950 --> 00:23:00,040
The name is going to be the first element.

313
00:23:00,050 --> 00:23:05,390
Inside each aere the price is going to be the second element inside each area and the color is going

314
00:23:05,390 --> 00:23:07,570
to be the first element inside the static.

315
00:23:07,850 --> 00:23:10,430
So that's why I passed the index 0.

316
00:23:10,460 --> 00:23:15,420
So I'll tell you that in programming we always count from number zero.

317
00:23:15,470 --> 00:23:25,880
So after this line of code I can't say EDT names prices and coloreds just put a pair of brackets here.

318
00:23:25,880 --> 00:23:29,030
So again pass the value index here.

319
00:23:29,040 --> 00:23:30,390
Still we are inside.

320
00:23:30,530 --> 00:23:36,350
Actually the first R8 is that the index number zero of that beach area which is going to be the first

321
00:23:36,350 --> 00:23:37,540
that is right.

322
00:23:37,550 --> 00:23:43,250
So now if you want to actually create another it it takes for the second element of that a which is

323
00:23:43,250 --> 00:23:45,260
going to be the price.

324
00:23:45,260 --> 00:23:48,630
So just put another of brackets and put number one here.

325
00:23:48,870 --> 00:23:49,400
Right.

326
00:23:49,460 --> 00:23:52,890
Assignment operator again new text.

327
00:23:53,030 --> 00:23:54,410
Hopefully that makes sense.

328
00:23:54,410 --> 00:23:57,830
It can be a little complex to actually figure out what's going on here.

329
00:23:58,040 --> 00:23:59,690
But don't worry about it.

330
00:24:00,080 --> 00:24:02,440
I'm going to explain it again here.

331
00:24:02,490 --> 00:24:04,590
Just write these lines of code here.

332
00:24:04,670 --> 00:24:09,800
And if you have actually problems always you can always opposed the discussion in the course and then

333
00:24:09,830 --> 00:24:11,500
I do my best to answer all of your questions.

334
00:24:11,510 --> 00:24:12,590
So what it takes.

335
00:24:12,590 --> 00:24:20,660
And I just need to pass the context update martial activity that this that this semicolon.

336
00:24:20,700 --> 00:24:23,070
So here we have a typo here.

337
00:24:23,310 --> 00:24:24,440
So now the error is caught.

338
00:24:24,480 --> 00:24:25,000
OK.

339
00:24:25,140 --> 00:24:29,970
And now we need to actually create another text for the word color.

340
00:24:30,150 --> 00:24:30,570
Right.

341
00:24:30,720 --> 00:24:38,710
So after this line of code I can't say the names and prices and colors and just put up have brackets.

342
00:24:38,730 --> 00:24:46,210
So again index and then I put a pair of brackets again and here index number two.

343
00:24:46,650 --> 00:24:47,220
OK.

344
00:24:47,220 --> 00:24:50,710
Assignment operator again new edit text.

345
00:24:50,730 --> 00:24:59,860
So I just need to pass this context update marshal activity to this semicolon So now we created actually

346
00:24:59,860 --> 00:25:07,990
free edit texts for each grade that we have inside these editing names and prices are edited edited

347
00:25:07,990 --> 00:25:09,620
names prices and colors.

348
00:25:09,760 --> 00:25:10,210
Right.

349
00:25:10,450 --> 00:25:15,030
So we have actually a beach area that holds other areas.

350
00:25:15,250 --> 00:25:23,240
So inside each tree that we have inside that area inside each R8 we are going to have three texts OK.

351
00:25:23,320 --> 00:25:26,030
The first one is for the name.

352
00:25:26,080 --> 00:25:29,350
The second is going to be for the price.

353
00:25:29,350 --> 00:25:34,830
And the first editor he's going to be for the color of that martial art object.

354
00:25:34,840 --> 00:25:43,000
So here it's time to specify the text of each edit text that we have inside these two dimensional array.

355
00:25:43,120 --> 00:25:51,190
So again let me create a new line here and here I can say edit the names prices and colors and put a

356
00:25:51,180 --> 00:25:52,900
pair of Ratchet's again index.

357
00:25:53,120 --> 00:25:59,660
And here again put another prop brackets index number 0 because I want to specify the name right dot

358
00:26:00,020 --> 00:26:02,940
set text.

359
00:26:02,970 --> 00:26:05,500
So here I just need to pass the text.

360
00:26:05,520 --> 00:26:14,130
So what is the text the text is going to be martial art object that gets martial art name.

361
00:26:14,700 --> 00:26:15,670
That's it.

362
00:26:16,140 --> 00:26:20,190
So we are inside that Arey editing names prices and colors.

363
00:26:20,190 --> 00:26:23,390
This is a two dimensional array an array that holds other arrows.

364
00:26:23,570 --> 00:26:27,430
You are going to go inside the index 0 of that array.

365
00:26:27,540 --> 00:26:30,210
So it is going to be an add another array right.

366
00:26:30,210 --> 00:26:34,920
And if you are going to go inside that array and if you are going to go inside the index number zero

367
00:26:34,920 --> 00:26:40,100
of that Arey index number zero that rabbit is going to be for the name Marshall name.

368
00:26:40,440 --> 00:26:44,720
And we say that said text is actually text right.

369
00:26:44,840 --> 00:26:52,040
That's a text Marshall object that get Marshall that name again the same scenario for the price of that

370
00:26:52,050 --> 00:26:52,990
Marshall update.

371
00:26:53,000 --> 00:26:58,980
So it is names prices and color is again put a pair of brackets index.

372
00:26:59,060 --> 00:27:10,200
This time we are going to insert an index number one that set text Marshall object dot and this time

373
00:27:10,250 --> 00:27:15,570
I want to get the Marshall dot price right get martial art price.

374
00:27:15,580 --> 00:27:21,740
So because this is going to be of type double here you need to convert this value to our string value

375
00:27:21,740 --> 00:27:26,690
so I can just put a concatenation operator and two cards right.

376
00:27:26,800 --> 00:27:33,920
And because inside that it the user is supposed to only enter a number not a text.

377
00:27:34,040 --> 00:27:40,840
You can specify the input type of that text so I can just say it it names prices and colors and put

378
00:27:40,840 --> 00:27:43,720
a pair of brackets your index again.

379
00:27:43,750 --> 00:27:49,770
Index Number 1 dot set input type that set in pooch's type

380
00:27:52,520 --> 00:27:54,980
inside the apprentice is it's just a pinhead input type

381
00:27:58,180 --> 00:27:58,650
number.

382
00:27:58,690 --> 00:27:59,530
That's just typing here.

383
00:27:59,530 --> 00:28:08,800
Number type class number so in this way the user can only enter a number inside this edit text because

384
00:28:08,800 --> 00:28:12,400
this is going to be the price of the martial art object.

385
00:28:12,400 --> 00:28:22,210
After this line of code here we need to specify actually the text of the for the color or text for it

386
00:28:22,220 --> 00:28:25,300
it takes which is for the color of that art object.

387
00:28:25,330 --> 00:28:30,000
So it names places and colors index.

388
00:28:30,280 --> 00:28:36,780
Just put the value index inside the first pair of brackets and again put on another pair of brackets.

389
00:28:36,790 --> 00:28:42,970
And this time we are going to insert the index number two of that at a time and up and just type it

390
00:28:42,970 --> 00:28:43,510
here.

391
00:28:43,570 --> 00:28:45,440
That said text.

392
00:28:45,670 --> 00:28:51,770
And he'll just refer to this martial art object that get martial art color.

393
00:28:51,930 --> 00:28:52,240
Right.

394
00:28:52,240 --> 00:29:00,670
That's it's not at the specified the text of each edit text that we have inside our two dimensional

395
00:29:00,730 --> 00:29:01,570
array.

396
00:29:01,690 --> 00:29:08,570
We need to specify an ID for each edit text that we're going to have inside these two dimensional array.

397
00:29:08,770 --> 00:29:09,610
OK.

398
00:29:09,610 --> 00:29:12,830
Because later we need to use this ID.

399
00:29:13,030 --> 00:29:14,420
OK this is very important.

400
00:29:14,490 --> 00:29:16,900
This must be this ID must be a unique ID.

401
00:29:16,900 --> 00:29:22,250
So let me show you how you can create a unique ID for each ID text.

402
00:29:22,390 --> 00:29:30,020
So here I can actually create a new line here so I can say edit the names prices and colors right.

403
00:29:30,090 --> 00:29:35,130
I put a pair of brackets index and again where is the index number 0.

404
00:29:35,140 --> 00:29:41,830
Because I want to specify the ID for the index for the editor that is instead of index number zero of

405
00:29:41,840 --> 00:29:43,560
these two dimensional r.e.

406
00:29:43,690 --> 00:29:44,380
Right.

407
00:29:44,450 --> 00:29:46,640
What sets ID.

408
00:29:47,510 --> 00:29:56,190
So the ID is going to be marshal or object that gets Id get ID plus 10 right.

409
00:29:56,200 --> 00:29:57,750
This is going to be a unique ID.

410
00:29:57,750 --> 00:30:04,020
I am referring to and getting the ID of that object and I am adding the value 10 to that value.

411
00:30:04,180 --> 00:30:09,820
So this is going to be the ID of this ID text which is for that name ID text right after this line of

412
00:30:09,820 --> 00:30:10,340
code.

413
00:30:10,580 --> 00:30:17,340
I'm going to specify an ID for the price of that monster not so it the names prices and colors put up

414
00:30:17,340 --> 00:30:20,000
that approach its index.

415
00:30:20,440 --> 00:30:25,660
And now we are going to go into the index number one way to get the value that the editor that is inside

416
00:30:25,660 --> 00:30:27,130
the index number one of this area.

417
00:30:27,370 --> 00:30:36,320
That said Id again marshal or object that gets martial art ID.

418
00:30:36,320 --> 00:30:41,580
This time we are going to add the value number 20 to this value which is going to be a unique ID.

419
00:30:41,600 --> 00:30:42,220
Right.

420
00:30:42,320 --> 00:30:48,860
We are not going to use the same idea here because each marshal of each text must have a unique ID.

421
00:30:48,870 --> 00:30:49,960
This is very important.

422
00:30:49,970 --> 00:30:53,340
So thats why I added the value 20 to this ID.

423
00:30:53,780 --> 00:31:00,590
And again even to specify an ID for the color edit text so it is in names and names places and colors

424
00:31:00,980 --> 00:31:04,080
put a pair of brackets index.

425
00:31:04,200 --> 00:31:14,670
And here I passed the value number to that set id martial art object that get martial art ID at this

426
00:31:14,670 --> 00:31:18,570
time V.A to the value of fretty to this idea here.

427
00:31:18,570 --> 00:31:23,140
So it is going to generate a unique ID for the for the color of the text.

428
00:31:23,190 --> 00:31:29,490
So now that we created this edit text for are actually greatly We are going to put these added text

429
00:31:29,520 --> 00:31:35,630
inside the columns that we are going to have inside the rows of our greedily.

430
00:31:35,670 --> 00:31:40,950
So we created edit text free edit takes actually for the name price color you specify the text of each

431
00:31:41,010 --> 00:31:42,030
edit text here.

432
00:31:42,210 --> 00:31:44,970
And then we specified the idea of each eritis year.

433
00:31:44,970 --> 00:31:49,430
Now its time to work on the button that youre going to have inside each row.

434
00:31:49,550 --> 00:31:55,770
Right so now so a lot is that we are going to have an ID which is going to be inside the first column

435
00:31:55,770 --> 00:31:59,620
of our row and then we have these two dimensional array.

436
00:31:59,670 --> 00:32:01,680
So which is going to have a free editor.

437
00:32:01,710 --> 00:32:08,040
So the first one here the name is going to be in in the column the second column the price you're in

438
00:32:08,060 --> 00:32:14,530
is going to be in the first column and the color here is going to be in the fourth column right.

439
00:32:14,880 --> 00:32:20,610
And finally we are going to create a pattern that is that is going to be actually in the final column

440
00:32:20,670 --> 00:32:21,980
of our row right.

441
00:32:22,020 --> 00:32:25,870
So thats why we created 5 columns inside each row.

442
00:32:26,760 --> 00:32:32,180
So here after these lines of code I can say modified but hands free.

443
00:32:32,310 --> 00:32:40,800
I am referring to this modified pitance Arey right I put a bit of righteous index which is currently

444
00:32:40,800 --> 00:32:42,910
is actually 0 for example right.

445
00:32:42,930 --> 00:32:53,010
So instead of index 0 of this array we are going to create a new pattern so new pattern and that we

446
00:32:53,010 --> 00:32:58,500
need to pass the context of that martial art activity toward this that's a semicolon.

447
00:32:58,560 --> 00:33:06,240
So for the index 0 of these modified buttons are they are going to have a new bottom and I can't say

448
00:33:07,660 --> 00:33:15,790
so here it's time to specify the text of these buttons so modify the buttons again put a pair of brackets

449
00:33:15,850 --> 00:33:19,910
index Dot said text.

450
00:33:19,910 --> 00:33:22,990
The text is going to be just put two coats here.

451
00:33:22,990 --> 00:33:27,820
Modify and then after this line of code here.

452
00:33:28,140 --> 00:33:31,080
So it's time to specify the ID of this button.

453
00:33:31,080 --> 00:33:38,460
So modify buttons Zendiks that said ID.

454
00:33:38,460 --> 00:33:46,080
So the idea can be marshal object that gets marshal ID here this get module it is going to actually

455
00:33:46,080 --> 00:33:49,620
refer to the ID of that module object and it is going to be a unique ID.

456
00:33:49,620 --> 00:33:53,620
Here we did not use this ID anywhere else inside our codes.

457
00:33:53,790 --> 00:33:59,140
For example for the ID of these editors here you can see that.

458
00:33:59,270 --> 00:34:04,380
Actually created a unique ID for each ID text but here for that.

459
00:34:04,380 --> 00:34:08,850
But in here for that button that you are going to have for each martial art object in order to allow

460
00:34:08,850 --> 00:34:16,770
the user to modify or update that Marshall object their unique ID can be at Marshall ID the ID of each

461
00:34:16,770 --> 00:34:17,800
martial art.

462
00:34:18,030 --> 00:34:26,580
And then at the after design of code I need to say that each BOTTEN each modified button is going to

463
00:34:26,580 --> 00:34:28,050
have a listener.

464
00:34:28,050 --> 00:34:28,320
Right.

465
00:34:28,320 --> 00:34:34,050
So thats why we said that the update marshal that active declasse is actually implementing the view

466
00:34:34,050 --> 00:34:40,350
that Uncle listen or that means that this class is going to listen to the interactions of the user with

467
00:34:40,350 --> 00:34:41,250
the button.

468
00:34:41,430 --> 00:34:49,500
So I can say modified buttons and I put a pair of brackets index and I can see a set of click listener.

469
00:34:49,500 --> 00:34:55,090
So the president is going to be what update marshal activity to this.

470
00:34:55,170 --> 00:35:00,510
So this class is going to listen to the clicks of the user of it that should be on the button on the

471
00:35:00,840 --> 00:35:03,560
modified buttons index of each button.

472
00:35:03,570 --> 00:35:08,140
So thats why here if you scroll down here you can see that we implemented this method here unclick.

473
00:35:08,400 --> 00:35:09,680
So let's scroll to the top.

474
00:35:09,820 --> 00:35:15,960
And now here inside this update using interface Meffert here and the inside is a modified user interface

475
00:35:15,980 --> 00:35:17,840
Meffert after this line of code.

476
00:35:18,000 --> 00:35:22,200
I can say now it's time to add these components.

477
00:35:22,200 --> 00:35:25,440
For example Thisted this takes view this as it takes.

478
00:35:25,620 --> 00:35:29,490
And finally the Spartan two are greatly out.

479
00:35:29,490 --> 00:35:34,520
So I notice that all Gridley's is going to have rows and columns inside each row.

480
00:35:34,530 --> 00:35:35,860
You're going to have columns.

481
00:35:36,060 --> 00:35:42,750
So now I can't say great lay out thought at VU.

482
00:35:42,940 --> 00:35:45,550
So not just that we're going to pass the child here.

483
00:35:45,550 --> 00:35:45,980
Right.

484
00:35:46,120 --> 00:35:50,670
So we do have different versions of this Smif at the first one only accepts the child.

485
00:35:50,740 --> 00:35:53,760
The second version accepts the child and the index.

486
00:35:53,880 --> 00:35:58,930
There's a further version here access the child and the width and the height of that child you are going

487
00:35:58,930 --> 00:36:00,410
to have to lay out a part.

488
00:36:00,610 --> 00:36:05,590
And if you have the index and the layout perhaps here for our application we are going to use the first

489
00:36:05,590 --> 00:36:11,200
version of the Smurfette which is going to be the child width and height so the child is going to be

490
00:36:11,320 --> 00:36:12,620
actually there.

491
00:36:12,760 --> 00:36:14,080
It takes a view for the ID.

492
00:36:14,290 --> 00:36:22,670
So I can't say the takes views index right come up.

493
00:36:22,790 --> 00:36:26,340
So now I need to specify the width of the space for.

494
00:36:26,460 --> 00:36:33,650
So there is going to be actually the I'm going to eyeball this text view I want this year which is going

495
00:36:33,650 --> 00:36:37,710
to be for the ID to take only 8 percent of the vote of the screen.

496
00:36:37,850 --> 00:36:44,150
So that's why we actually created a variable here in order to get their video of the screen here right

497
00:36:44,150 --> 00:36:45,750
in line number 57.

498
00:36:45,770 --> 00:36:52,590
So now with so here it is the screen is right screen which divided by eight.

499
00:36:52,700 --> 00:36:59,600
In this way it is going to take only 8 percent of the width of the screen and for the height you want

500
00:36:59,630 --> 00:37:02,760
this it takes you to be actually wrapped content.

501
00:37:02,810 --> 00:37:10,780
So I can refer to this view group class view group that lay out perhaps that rap content.

502
00:37:10,810 --> 00:37:16,100
So this is actually going to be a value for the height of this.

503
00:37:16,110 --> 00:37:23,680
It takes your view group is going to be the parent here which actually holds this view here.

504
00:37:23,850 --> 00:37:28,800
So just by just referring to this vehicle if we can just the out perhaps and the raw content.

505
00:37:28,900 --> 00:37:34,990
So let me create a new line so that you can see these values better after this line of code here.

506
00:37:35,010 --> 00:37:43,200
I can't say now it's time to add the first text the the name it it takes two or to greedily out.

507
00:37:43,260 --> 00:37:51,270
So just I here it greatly out that at you and here just referred to that multi-dimensional Arey which

508
00:37:51,310 --> 00:37:57,130
is going to be a two dimensional at a EDT names prices and colors so names prices and colors and put

509
00:37:57,130 --> 00:38:00,420
a lot of brackets and forth for the first black to step in here.

510
00:38:00,490 --> 00:38:04,330
Index and let's put another profe brackets here.

511
00:38:04,780 --> 00:38:10,650
And here inside the brackets just put the value zero index number zero right comma.

512
00:38:11,350 --> 00:38:15,590
And here I want to specify the width of this it it takes inside.

513
00:38:15,610 --> 00:38:16,480
It is true.

514
00:38:16,690 --> 00:38:18,700
So that is what I want.

515
00:38:18,720 --> 00:38:27,010
This name it it takes to take to any 8 percent of the width of the screen so I can actually just type

516
00:38:27,010 --> 00:38:30,120
in here with the screen V.

517
00:38:31,260 --> 00:38:36,800
Multiplied by zero point twenty eight comma.

518
00:38:36,860 --> 00:38:40,510
So not in this way it's going to actually take into.

519
00:38:40,600 --> 00:38:43,310
Twenty eight percent of the width of this screen.

520
00:38:43,360 --> 00:38:44,370
This is the formula.

521
00:38:44,600 --> 00:38:48,170
Ok screen with multiplied by 0.2 88.

522
00:38:48,240 --> 00:38:50,940
Now I just need to specify the height of this and it takes.

523
00:38:51,010 --> 00:38:52,320
Is going to be wrapped content.

524
00:38:52,340 --> 00:38:59,510
So I can't just type here via a group that Lay have poems that rap content.

525
00:38:59,520 --> 00:39:04,280
So now let me create a new line here so that you can see these values better.

526
00:39:04,380 --> 00:39:09,300
But here you can see that for the second argument here we need to pass a value of type integer.

527
00:39:09,510 --> 00:39:15,240
But the result of this operation is actually of type float like float or double or decimal value.

528
00:39:15,300 --> 00:39:19,170
So here I need to cast the result of this operation here.

529
00:39:19,170 --> 00:39:23,350
Screen is multiplied by zero point twenty eight to an integer value.

530
00:39:23,490 --> 00:39:29,120
So let's put this operation inside the apprentice's screen which multiplied by zero point eight in say

531
00:39:29,150 --> 00:39:29,950
the practice is.

532
00:39:30,060 --> 00:39:35,890
And before this prentices I can put another pair of practices and I can't just put a value integer here.

533
00:39:35,910 --> 00:39:40,120
So in this way it's going to actually first is isn't as acute this operation here.

534
00:39:40,160 --> 00:39:43,140
Screen which multiplied by zero point twenty eight.

535
00:39:43,230 --> 00:39:47,940
And the result is going to be Chastity's an integer value so this means that the decimal value is going

536
00:39:47,940 --> 00:39:53,330
to be actually the decimal number after the decimal is going to be actually eliminated.

537
00:39:53,400 --> 00:39:58,760
So that's why it is Cester to an integer value here and now you can see that the error is gone.

538
00:39:59,160 --> 00:40:07,950
So now after this line of code I can say let's add the second it takes two or Gridley out inside each

539
00:40:07,950 --> 00:40:08,240
room.

540
00:40:08,280 --> 00:40:08,680
Right.

541
00:40:08,700 --> 00:40:11,400
So after adding the name it takes.

542
00:40:11,460 --> 00:40:13,420
Now it's time to add the price it takes.

543
00:40:13,420 --> 00:40:17,480
So I can't say great lay out that add value.

544
00:40:18,300 --> 00:40:20,650
And again I refer to these two dimensional array.

545
00:40:20,660 --> 00:40:22,980
It is the names prices and colors.

546
00:40:23,010 --> 00:40:29,250
Put a pair of brackets index and again put a pair of brackets again and this time pass the value.

547
00:40:29,250 --> 00:40:31,960
Number one index number one right comma.

548
00:40:32,160 --> 00:40:35,400
And here I need to specify the weight of these idiots.

549
00:40:35,400 --> 00:40:40,430
So I want this editor to take 25 percent of the width of the screen.

550
00:40:40,740 --> 00:40:45,420
So I just put a pair of first again on it which has this value to an integer value so I just put a set

551
00:40:45,420 --> 00:40:46,310
of practices here.

552
00:40:46,530 --> 00:40:58,070
And again I put another pair of practices screen with multiplied by 0.25 write come on.

553
00:40:58,240 --> 00:41:00,050
So this is our second argument.

554
00:41:00,100 --> 00:41:06,130
And finally you need to specify the height of our text so the height is going to be the content view

555
00:41:06,160 --> 00:41:11,000
group that lay out the poems that rap content.

556
00:41:11,020 --> 00:41:13,580
So let me create a new line here.

557
00:41:13,600 --> 00:41:17,450
Now it's time to add our color takes to our greatly.

558
00:41:17,470 --> 00:41:23,600
So lay out that view and I put it here.

559
00:41:23,710 --> 00:41:27,850
I just need to refer to these two dimensional area names prices and colors.

560
00:41:28,210 --> 00:41:35,010
And here just put a pair of brackets index and index number one in this number two actually you are

561
00:41:35,010 --> 00:41:41,140
going to go inside the next number to which is going to be for the color text comma and then here I

562
00:41:41,140 --> 00:41:43,890
just need to specify which of these editors.

563
00:41:43,880 --> 00:41:48,440
So again I want these it takes to take 25 percent of the vote of the screen.

564
00:41:48,520 --> 00:41:55,120
So put up her Apprentice's integer and again put another pair of practices and here refers to this screen

565
00:41:55,180 --> 00:42:03,150
which multiplied by zero is 0.25 0.25.

566
00:42:03,590 --> 00:42:04,310
Come on.

567
00:42:04,310 --> 00:42:09,710
Finally we need to specify the height which is going to be of our content group that lay out perhaps

568
00:42:10,070 --> 00:42:13,070
that wrapped content.

569
00:42:13,120 --> 00:42:15,160
So let me create a new line here.

570
00:42:16,840 --> 00:42:17,320
So that's it.

571
00:42:17,320 --> 00:42:22,110
We added our takes or it takes two or three play out.

572
00:42:22,120 --> 00:42:25,110
Now it's time to add our part into our grittily out.

573
00:42:25,120 --> 00:42:30,050
So here I think 25 percent can be a little bit larger a little bit a bit.

574
00:42:30,100 --> 00:42:31,840
It's going to take a lot of space.

575
00:42:31,840 --> 00:42:38,100
So I think let's change it to 20 percent so just typing zero point 20 percent for the for this it it

576
00:42:38,110 --> 00:42:40,660
takes that you can see this one here.

577
00:42:40,770 --> 00:42:44,800
Index number one which is going to be for the price of that much.

578
00:42:44,980 --> 00:42:51,660
And for this one also it's better to specify that this as it takes to only take 20 percent of the vote

579
00:42:51,760 --> 00:42:52,530
of the screen.

580
00:42:52,540 --> 00:42:58,100
So let's just pass the values 0.20 percent which is 0.20.

581
00:42:58,300 --> 00:43:05,650
So it's Greivis multiplied by 0.20 is going to actually give us that the value of the V which is going

582
00:43:05,650 --> 00:43:09,120
to take only 20 percent of the VIF of this group.

583
00:43:09,130 --> 00:43:17,650
So after this line of code I can't say grittily out duds at view and in here I just need to refer to

584
00:43:17,650 --> 00:43:23,880
these modified buttons at a well if it turns out he just put a pair of brackets index.

585
00:43:23,890 --> 00:43:28,430
So this is going to be the child that I need to specify the width of this button.

586
00:43:28,480 --> 00:43:33,980
So I want this button is modified button to take 30 percent of the width of the screen.

587
00:43:34,120 --> 00:43:41,380
So just refer to this screen be valuable multiplied by zero point fifty.

588
00:43:41,410 --> 00:43:44,950
So because again the result of this operation is going to be off the decimal.

589
00:43:44,950 --> 00:43:51,370
So let's put this operation inside the apprentice's and that here before this prentices with another

590
00:43:51,370 --> 00:43:57,060
proft prentices instead of has just passed a value integer the name integer OK.

591
00:43:57,250 --> 00:44:02,740
And then here finally you need to specify the height of this button which is again going to be that

592
00:44:02,740 --> 00:44:07,740
content view group that lay out columns that wrap content.

593
00:44:08,110 --> 00:44:11,160
So let me create a new line here again.

594
00:44:11,200 --> 00:44:12,720
So now you can see these values better.

595
00:44:12,820 --> 00:44:18,460
So we added all these components to our really out to be added the text view these as it takes.

596
00:44:18,460 --> 00:44:19,910
And finally the button.

597
00:44:20,080 --> 00:44:21,310
Right.

598
00:44:21,310 --> 00:44:26,410
So now it's time to actually put more logic's here.

599
00:44:26,410 --> 00:44:27,130
So not notice that.

600
00:44:27,130 --> 00:44:31,770
Finally here in line number 100 we are adding one value to the value of this index here.

601
00:44:31,780 --> 00:44:33,040
Right.

602
00:44:33,040 --> 00:44:36,770
So now this is our For Look this is our for in loop.

603
00:44:36,820 --> 00:44:45,390
After the ended curly brace of this for in loop here I want to add discretely out to our scroll view.

604
00:44:45,680 --> 00:44:49,290
OK I want to add this Greenly out to our scroll view.

605
00:44:49,450 --> 00:44:55,240
So here after the ending curly brace of this for loop and before the ending curly brace of this modified

606
00:44:55,480 --> 00:45:05,380
user interface Smurfette here I'm going to say scroll view thought I view Great out and I can actually

607
00:45:05,380 --> 00:45:11,260
say set content view scroll view right.

608
00:45:11,330 --> 00:45:14,950
We are calling the set content view here this Mefford here.

609
00:45:14,950 --> 00:45:22,020
So that is going to actually specify that these components are going to be on the screen and we want

610
00:45:22,020 --> 00:45:30,070
the user interface to be actually created programmatically OK not by just referring to us as XML file

611
00:45:30,160 --> 00:45:32,530
we are creating the user interface programmatically.

612
00:45:32,530 --> 00:45:37,570
So we must call sets content to view scroll view the content view is going to be the scroll view.

613
00:45:37,600 --> 00:45:44,410
And finally we need to specify that what is going to happen when the user actually clicks or touches

614
00:45:44,680 --> 00:45:46,380
that modify button.

615
00:45:46,420 --> 00:45:51,860
So that's why we created these Uncle Meffert inside this update Marcheline activity class.

616
00:45:51,880 --> 00:45:54,420
So let's go inside the curly braces of this method here.

