1
00:00:00,390 --> 00:00:09,930
So as you can say here in lower number 69 here we have actually this value rose of spottiness in animalcules.

2
00:00:09,990 --> 00:00:16,530
So here as you can see we actually declared this valuable here inside our class as you can see here

3
00:00:17,430 --> 00:00:21,920
rows of spottiness in animalcules in Lima in line number 42.

4
00:00:22,140 --> 00:00:25,520
So this is actually an average of linear layouts right.

5
00:00:25,620 --> 00:00:31,550
An average of linearly else and then Aimee's rows of just spottiness in an animal quiz.

6
00:00:31,710 --> 00:00:33,490
So what do I mean by this.

7
00:00:33,660 --> 00:00:37,760
Let's actually go inside our fragment underly minute minute example here.

8
00:00:37,920 --> 00:00:38,980
As you can see.

9
00:00:39,240 --> 00:00:46,380
So now let me actually go inside this Design tab as you can see here we have some linearly outs here

10
00:00:46,470 --> 00:00:48,360
as you can see this is the first one.

11
00:00:48,510 --> 00:00:50,280
This is the second one and this is the first one.

12
00:00:50,280 --> 00:00:54,810
So as you can see here these are horizontal linearly outs right.

13
00:00:55,110 --> 00:01:01,890
And these linear layouts actually hold buttons each linearly out here actually holds two buttons.

14
00:01:01,890 --> 00:01:03,480
The first one Hold hold.

15
00:01:03,510 --> 00:01:05,000
Actually these two buttons.

16
00:01:05,040 --> 00:01:12,530
The second linearly out here as you can see hold these up these two buttons and the first linear layout

17
00:01:12,570 --> 00:01:15,770
here holds these two buttons.

18
00:01:15,810 --> 00:01:21,300
So if they actually go back inside our main activity AFFREIGHTMENT out of a fight here as you can see

19
00:01:21,390 --> 00:01:29,070
I actually declare an array of these Lilja it's rows of buttons in animalcules.

20
00:01:29,070 --> 00:01:35,600
So now as you can see here in line number 69 I am actually initialising that right here.

21
00:01:35,790 --> 00:01:44,040
So the rows of spottiness in animalcules assignment operator new linearly out and here as you can see

22
00:01:44,040 --> 00:01:50,150
because we are actually initialising and at a minute to actually specify the size right.

23
00:01:50,280 --> 00:01:52,560
So the size of this area is going to be free.

24
00:01:52,770 --> 00:01:59,700
And this means that we can actually assign three values of type linearly out to these three rows of

25
00:01:59,700 --> 00:02:02,020
just spottiness in animalcules right.

26
00:02:02,190 --> 00:02:08,790
So here I am specifying the size of this Auret which actually can actually only hold the values of type

27
00:02:08,790 --> 00:02:09,660
linear left.

28
00:02:09,660 --> 00:02:13,440
This is very important and in line number 70 here.

29
00:02:13,470 --> 00:02:17,630
As you can see again I referred to the name of this at a here.

30
00:02:17,770 --> 00:02:21,070
Rows of good spot in Animal cookies.

31
00:02:21,390 --> 00:02:22,340
And then here.

32
00:02:22,490 --> 00:02:26,490
Inside the brackets I actually assigned value 0.

33
00:02:26,550 --> 00:02:32,120
And this means that it's going to actually go inside the index number zero of this at a loss of just

34
00:02:32,210 --> 00:02:33,520
buttons in animalcules.

35
00:02:33,540 --> 00:02:39,570
So in line number 69 you are actually initializing this at a and b are saying that the size of this

36
00:02:39,630 --> 00:02:40,910
array is going to be free.

37
00:02:41,040 --> 00:02:44,930
But we haven't assigned any values to this area yet.

38
00:02:44,970 --> 00:02:51,550
So this is going to be an empty arayed that can only hold free values of type linear layout.

39
00:02:51,560 --> 00:02:58,380
Right but a low number 70 here I want to actually initialize or I mean to assign a value to the index

40
00:02:58,380 --> 00:03:00,610
zero of this outbreak.

41
00:03:00,630 --> 00:03:04,340
So Rose of spottiness in animalcules Sub-Zero.

42
00:03:04,410 --> 00:03:08,190
So it's going to go inside the index zero of this area here.

43
00:03:08,280 --> 00:03:10,470
Rows of spottiness in animalcules.

44
00:03:10,470 --> 00:03:12,690
And then I put an assignment operator here.

45
00:03:12,690 --> 00:03:14,750
So you want to assign a value here right.

46
00:03:14,960 --> 00:03:17,810
I want to assign a value to the index zero of this ID.

47
00:03:17,850 --> 00:03:25,380
So here I am actually thinking about you two are linearly out view that's fine to view by ID as you

48
00:03:25,380 --> 00:03:30,570
can see here are that Alte that first row linearly out.

49
00:03:30,570 --> 00:03:35,100
So if we actually go back inside are actually a fragment.

50
00:03:35,120 --> 00:03:41,160
Underline many of them in here as you can see the first linearly out here as you can see the idea of

51
00:03:41,160 --> 00:03:46,920
the first linearly and here at the bottom left hand side you can see inside is componentry section.

52
00:03:46,920 --> 00:03:49,690
Here it says first linearly.

53
00:03:49,890 --> 00:03:53,670
So this is the 80 of these linearly out here right.

54
00:03:53,700 --> 00:03:59,170
Or inside the properties section you can see that it says the idea is first row linearly out.

55
00:03:59,370 --> 00:04:06,040
So are you going to actually assign this linearly out here to that as a main activity fragment.

56
00:04:06,080 --> 00:04:08,630
And as you can see I am actually referring to that ID.

57
00:04:08,820 --> 00:04:17,080
So the index 0 of these are a holds this value first roll linearly out and in line number 71.

58
00:04:17,100 --> 00:04:18,660
Again we are doing the same thing.

59
00:04:18,750 --> 00:04:24,510
But instead we want to actually assign a value to their index number one of these at a.

60
00:04:24,550 --> 00:04:29,790
So those of guess spottiness in animal cuius index 0.

61
00:04:30,180 --> 00:04:30,660
Excuse me.

62
00:04:30,660 --> 00:04:31,770
Index number one.

63
00:04:31,980 --> 00:04:37,670
So those of spottiness in animal animalcules index number one assignment operator.

64
00:04:37,680 --> 00:04:45,590
So here I am actually testing disvalue to a linearly out of you that find view by ID or thought Id that

65
00:04:45,630 --> 00:04:47,870
second row linearly out.

66
00:04:48,000 --> 00:04:51,570
So if I go back and say this fragment underline minute example here.

67
00:04:52,050 --> 00:04:54,630
And if I select this second row linearly out here.

68
00:04:54,660 --> 00:04:58,980
Now as you can see the ID is second row linearly out.

69
00:04:59,400 --> 00:05:02,950
So go back inside our main activity frypan that of a file.

70
00:05:03,070 --> 00:05:05,170
And again in line number 72.

71
00:05:05,380 --> 00:05:09,790
I want to actually assign a value to the index number two of this at 8.

72
00:05:09,820 --> 00:05:15,110
So as you can see here this array holds a free reduce right the size of this area is free.

73
00:05:15,250 --> 00:05:17,740
So the index number 0 1 2.

74
00:05:17,960 --> 00:05:22,900
So rows of spottiness in animal animalcules stop number two assignment operator.

75
00:05:22,960 --> 00:05:29,500
Here again I am casting this value into a linear layout view that's fine view by ID are that Id dot

76
00:05:29,770 --> 00:05:35,480
first row linearly out and then here as you can see in line number 73.

77
00:05:35,530 --> 00:05:39,550
I am actually initializing DCX the answer.

78
00:05:39,570 --> 00:05:41,860
CTX the answer assignment operator.

79
00:05:41,860 --> 00:05:47,890
And here I am Chastity's ready to take a few feet view that find your ID are that ID that makes the

80
00:05:47,890 --> 00:05:49,340
answer right.

81
00:05:49,660 --> 00:05:51,820
So hopefully that makes sense.

82
00:05:51,820 --> 00:05:56,860
So now I am going to pasting some more lines of code here and then I'm going to explain to you what's

83
00:05:56,860 --> 00:05:58,010
going on here.

84
00:05:58,330 --> 00:06:02,910
So as you can see here these are the lines of code that I pasted here.

85
00:06:03,070 --> 00:06:09,400
So here as you can see we have a for loop and I want to either get all of the values that we have inside

86
00:06:09,400 --> 00:06:11,780
these rows of your spottiness in animalcules.

87
00:06:11,830 --> 00:06:13,030
Great as you can see here.

88
00:06:13,030 --> 00:06:16,960
So these are a as you can see Holts values of type linearly.

89
00:06:17,020 --> 00:06:17,580
Right.

90
00:06:17,620 --> 00:06:22,070
So as you can see I want to actually iterate over the values of this area.

91
00:06:22,090 --> 00:06:27,760
So I created a variable here linearly out and the name is a row and this row is going to actually go

92
00:06:27,760 --> 00:06:34,640
inside this array and it's going can actually execute the lines of code inside is for loop here.

93
00:06:34,780 --> 00:06:44,170
Once for each values of dollar inside of this rate this volume is going to be executed right for each

94
00:06:44,170 --> 00:06:50,140
row for each value that we have inside is a loss of your spot hands in animalcules at 8.

95
00:06:50,210 --> 00:06:52,160
This for loop is going to be executed.

96
00:06:52,520 --> 00:06:58,340
And now as you can see again inside this for loop we have another for loop here.

97
00:06:58,360 --> 00:07:04,900
So for into column and index 0 as you can see here so as you can see I actually created a value which

98
00:07:04,900 --> 00:07:10,690
is an integer and initially I assigned the value zero to this valuable.

99
00:07:10,990 --> 00:07:16,750
And then here I am specifying the condition in which in is going to actually determine that how many

100
00:07:16,750 --> 00:07:19,680
times this volume is going to be executed.

101
00:07:19,870 --> 00:07:27,460
So until the value of this column variable here is actually less than the value of the child count of

102
00:07:27,460 --> 00:07:28,740
this row.

103
00:07:28,780 --> 00:07:35,080
So as you can see here if you have a linear layout you're right and linear layouts are actually view

104
00:07:35,080 --> 00:07:35,920
groups.

105
00:07:35,920 --> 00:07:42,790
And that means that view groups that can actually hold tight or loops can actually hold tides and we

106
00:07:42,790 --> 00:07:45,760
can actually refers to those choices.

107
00:07:45,880 --> 00:07:51,490
And as you can see here linearly out and this alone is of type linearly out and it's going to iterate

108
00:07:51,520 --> 00:07:52,960
over the values of this address.

109
00:07:52,960 --> 00:07:56,820
So for example the first value is index 0 right.

110
00:07:56,860 --> 00:08:03,370
The first the first value that we have inside these rows of spottiness in animalcules array is actually

111
00:08:03,950 --> 00:08:06,720
a value that is assigned in index 0 of this at a rate.

112
00:08:06,730 --> 00:08:10,070
So now this row number is zero.

113
00:08:10,300 --> 00:08:12,920
And then it's going to go inside this for loop here.

114
00:08:13,210 --> 00:08:16,210
And as you can see here the column is zero.

115
00:08:16,270 --> 00:08:21,600
And it says until the column is less than the child count of this low.

116
00:08:21,850 --> 00:08:26,890
So this means what is going to be the children of that throw.

117
00:08:26,890 --> 00:08:32,290
So for example let me actually go inside this fragment underline minute exam and here as you can see

118
00:08:32,290 --> 00:08:33,270
for example look at this.

119
00:08:33,290 --> 00:08:37,310
The row here this row actually holds these two buttons.

120
00:08:37,480 --> 00:08:46,060
And this means that this row this linearly and here is the parent of these buttons or in other words

121
00:08:46,420 --> 00:08:52,800
these two buttons are actually highlights of this linearly out of this row.

122
00:08:52,810 --> 00:08:58,520
So we have this throw this rule as you can see here and this through the have three rows here.

123
00:08:58,840 --> 00:09:04,150
So if I actually go inside this main activity fragment out of a fight here I am actually creating a

124
00:09:04,150 --> 00:09:04,740
row.

125
00:09:04,780 --> 00:09:10,490
I am actually creating a for loop in order to go inside that those rows and then I want to go actually

126
00:09:10,490 --> 00:09:14,610
the inside two rows in order to get the children of those rows.

127
00:09:14,620 --> 00:09:21,780
So this column is less than that get child count and after each execution of this for loop it going

128
00:09:21,800 --> 00:09:25,530
actually increment the value of this column by 1.

129
00:09:25,540 --> 00:09:33,190
So for example let's go step by step here for example the first value that we have inside is rows of

130
00:09:33,220 --> 00:09:37,770
guest buttons in animal quiz is actually the value that is assigned in index 0.

131
00:09:37,780 --> 00:09:41,710
So the value that is assigned in index 0 is first row linearly.

132
00:09:41,730 --> 00:09:42,380
Right.

133
00:09:42,430 --> 00:09:48,060
And if I go back inside this fragment on the last minute its image you can see that the first row linearly

134
00:09:48,180 --> 00:09:49,000
is this row.

135
00:09:49,180 --> 00:09:55,810
So now let's go back inside our main activity fragment the job file here and now we have this row here.

136
00:09:55,810 --> 00:10:01,710
So now this row is going to be that first value that first linearly out and then it's going to actually

137
00:10:01,710 --> 00:10:02,900
go inside the loop.

138
00:10:03,000 --> 00:10:07,110
So here we have a column which initially it is assigned the value zero.

139
00:10:07,330 --> 00:10:13,200
And then this is going to this fall appeal is going to be executed until this column is actually less

140
00:10:13,200 --> 00:10:20,670
than the value of the height count of that specific flow of that first linearly out and then it's going

141
00:10:20,670 --> 00:10:25,410
to actually increment discolored by one after each execution of this for loop.

142
00:10:25,740 --> 00:10:33,840
And as you can see here we have this Actually we have created a bottom here about an object so Potten

143
00:10:34,080 --> 00:10:37,280
and the name is PTEN guess assignment operator.

144
00:10:37,290 --> 00:10:41,180
And here I am actually casting this object to a button object.

145
00:10:41,340 --> 00:10:43,950
And now I am referring to this law here.

146
00:10:43,960 --> 00:10:44,380
Right.

147
00:10:44,400 --> 00:10:50,260
Roll that get child at column.

148
00:10:50,410 --> 00:10:50,820
Right.

149
00:10:50,840 --> 00:10:54,480
So for example initially the Cullom is assigned the value zero.

150
00:10:54,560 --> 00:10:55,160
Right.

151
00:10:55,190 --> 00:11:00,530
So a row that gets the child at Cullom means that it's going to actually go inside that.

152
00:11:00,560 --> 00:11:02,880
For example this is first linearly.

153
00:11:02,920 --> 00:11:03,480
Right.

154
00:11:03,500 --> 00:11:07,450
So the first rule in it linearly out here inside is BRAITMAN underline minute exam.

155
00:11:07,460 --> 00:11:13,970
Here we have this first row Linnea lay out and the first child is this part in here.

156
00:11:13,970 --> 00:11:15,020
This is the first right.

157
00:11:15,050 --> 00:11:21,120
This is the child that is actually inside of the index zero of these nonlinearly out.

158
00:11:21,350 --> 00:11:27,370
And this is the child that is actually the inside of the index number of one of these linearly out.

159
00:11:27,680 --> 00:11:32,710
And that's why you can see that inside this main activity fragment that a file.

160
00:11:32,720 --> 00:11:37,060
Here we are saying that the row that a child at index column.

161
00:11:37,080 --> 00:11:40,070
So in this column 0 is this column right.

162
00:11:40,340 --> 00:11:43,260
And it is going to actually do something with that button.

163
00:11:43,280 --> 00:11:45,060
So between guess that said Uncle Nicholas.

164
00:11:45,060 --> 00:11:48,770
And so here I am actually making that button a listener.

165
00:11:48,800 --> 00:11:52,190
So if I go back and say this fragment underline minute it's him in here.

166
00:11:52,210 --> 00:11:56,950
Here I am actually making disputant a listener to the clicks of the user.

167
00:11:56,950 --> 00:12:03,530
And then here I actually put this value so we haven't created a listener for this button here so we

168
00:12:03,530 --> 00:12:09,560
need to create that one later in our code but for now just put this value here and here as you can see

169
00:12:09,560 --> 00:12:14,080
I am saying that PTEN guess that set text size 24.

170
00:12:14,330 --> 00:12:20,900
So here I am actually specifying the size of the spot in this specific spot in the button that is inside

171
00:12:20,900 --> 00:12:23,590
of the index 0 of that actually row.

172
00:12:23,600 --> 00:12:26,300
So between guess that's a text size 24.

173
00:12:26,810 --> 00:12:35,480
And then after the after the end in a code after this for loop is actually executed it's going to actually

174
00:12:35,520 --> 00:12:39,440
to go inside this pull up here and it's going actually to take this condition here.

175
00:12:39,590 --> 00:12:41,980
It's going to actually look at this column here.

176
00:12:42,200 --> 00:12:47,120
And as you can see because the value of the column of value is now incremented by 1.

177
00:12:47,240 --> 00:12:49,360
It's going to check this condition here again.

178
00:12:49,520 --> 00:12:57,660
So number one is less than the value of the Get child count of the throw because each draw has two buttons.

179
00:12:57,680 --> 00:13:00,110
So number one is less than number two right.

180
00:13:00,110 --> 00:13:05,720
So this expression here evaluates to true and then again it's going to execute the lines of code inside

181
00:13:05,720 --> 00:13:09,920
these buttons for the second button that we have inside this row.

182
00:13:09,950 --> 00:13:11,530
This is our second button right.

183
00:13:11,640 --> 00:13:16,940
And now as you can see here after this group is executed again it can actually add one value to the

184
00:13:16,940 --> 00:13:17,960
value of this column.

185
00:13:17,990 --> 00:13:20,430
And then again it's going to check this condition here.

186
00:13:20,450 --> 00:13:23,840
So now because the value of this color is now number two.

187
00:13:23,990 --> 00:13:30,130
Right because the value of this column is now number two and number two is not less than number two

188
00:13:30,140 --> 00:13:36,230
because the child count of each low is to write each of those as you can see here inside this linear

189
00:13:36,240 --> 00:13:41,490
layout as you can see each rose has actually two buttons.

190
00:13:41,540 --> 00:13:43,130
This law has two buttons.

191
00:13:43,130 --> 00:13:45,670
This rule has two buttons and this rule has two buttons.

192
00:13:45,770 --> 00:13:51,350
And as you can see here because now the value of the column is not actually less than the value of the

193
00:13:51,350 --> 00:13:56,540
Get child count two is not the start get to count then then this is not going to be executed.

194
00:13:56,540 --> 00:13:59,660
And again it's going to actually go inside this.

195
00:13:59,960 --> 00:14:05,960
Here this fall loop is the apprentice's of this for a loop and now it's going to increment the value

196
00:14:05,960 --> 00:14:08,090
of these for example.

197
00:14:08,120 --> 00:14:11,870
Now the value of this row is going to be index number one.

198
00:14:12,140 --> 00:14:12,720
Right.

199
00:14:12,860 --> 00:14:18,860
So this for loop here as you can see is going to be executed for each row that we have inside this loads

200
00:14:18,860 --> 00:14:21,950
of spot and guest buttons in animalcules.

201
00:14:21,950 --> 00:14:27,170
So now this row is going to be the road that is inside that is inside of the index number one of this

202
00:14:27,170 --> 00:14:27,770
at.

203
00:14:28,160 --> 00:14:32,240
And then it's going to again check this condition and then it again is going to execute these lines

204
00:14:32,240 --> 00:14:34,210
of code for that specific rule.

205
00:14:34,440 --> 00:14:34,840
Right.

206
00:14:34,850 --> 00:14:41,480
As you can see we have three rows and we need to actually use codes used those codes for these other

207
00:14:41,480 --> 00:14:43,160
those two.

208
00:14:43,220 --> 00:14:45,280
So hopefully that makes sense.

