1
00:00:00,720 --> 00:00:04,110
So first we created an array of group names.

2
00:00:04,110 --> 00:00:08,590
This is actually a one dimensional array and then we created a two dimensional array.

3
00:00:08,610 --> 00:00:08,920
OK.

4
00:00:08,940 --> 00:00:11,940
And array of arrays and the name of this area.

5
00:00:11,960 --> 00:00:13,180
Each child names.

6
00:00:13,240 --> 00:00:19,170
OK so now let's actually declare our valuable of type context.

7
00:00:19,200 --> 00:00:19,670
OK.

8
00:00:19,680 --> 00:00:24,460
In order to specify the context of our activity of our application.

9
00:00:24,690 --> 00:00:29,330
So if we have this context class and as you can see it actually automatically imported this context

10
00:00:29,330 --> 00:00:35,610
the class to our activity here to our class and the name of this object is context.

11
00:00:35,700 --> 00:00:36,500
OK.

12
00:00:36,990 --> 00:00:41,270
And as you can see I didn't actually instantiate this object yet.

13
00:00:41,370 --> 00:00:47,670
So I want to actually instantiated Venda actually and the constructor of this class of this class is

14
00:00:47,670 --> 00:00:48,230
being called.

15
00:00:48,250 --> 00:00:50,910
Ok so here I can just type in public.

16
00:00:51,180 --> 00:00:56,520
OK expandable at least you adapter.

17
00:00:56,520 --> 00:01:02,020
OK so remember the name of your constructor must be the same as the name of your class.

18
00:01:02,040 --> 00:01:02,630
OK.

19
00:01:02,910 --> 00:01:07,800
And then I put in a pair of brackets here are part of our practices as you can see here.

20
00:01:08,370 --> 00:01:14,570
And here you can see and inside the prentices I can actually specify the arguments of these are constructor.

21
00:01:14,580 --> 00:01:17,320
So here I can just type in context.

22
00:01:17,790 --> 00:01:19,610
OK context.

23
00:01:19,860 --> 00:01:27,150
So remember that context allows you allows this activity to actually interact with other features of

24
00:01:27,240 --> 00:01:29,010
Android outside of this activity.

25
00:01:29,030 --> 00:01:34,860
OK so we can't use context in lots of places in our Android application programming.

26
00:01:34,890 --> 00:01:35,550
OK.

27
00:01:35,970 --> 00:01:37,050
So this is very important.

28
00:01:37,050 --> 00:01:43,350
So context allows this activity this class to interact with other features outside of this activity.

29
00:01:43,380 --> 00:01:52,350
So we need to actually initialize this context so this that context assignment operator context and

30
00:01:52,350 --> 00:01:55,190
then I need to put in a semicolon at the end of my statement here.

31
00:01:55,230 --> 00:02:00,660
So as you can see here we have this great group of Kant here as you can see we are actually over writing

32
00:02:00,660 --> 00:02:02,610
this method in our class.

33
00:02:02,610 --> 00:02:03,150
OK.

34
00:02:03,360 --> 00:02:05,590
So as you can see here it says return 0.

35
00:02:05,700 --> 00:02:11,600
So here we need to actually return the number of elements that are inside of this group names here.

36
00:02:11,610 --> 00:02:13,190
OK inside of this group names Ari.

37
00:02:13,280 --> 00:02:13,810
OK.

38
00:02:14,070 --> 00:02:17,280
So here I can just refer to the name of that a group names.

39
00:02:17,480 --> 00:02:19,420
K Dot lenth.

40
00:02:19,910 --> 00:02:20,710
OK.

41
00:02:21,180 --> 00:02:23,820
And as you can see here you have these get.

42
00:02:23,860 --> 00:02:25,100
She didn't count here.

43
00:02:25,170 --> 00:02:27,620
And we need to actually implement this method here.

44
00:02:27,780 --> 00:02:30,250
So as you can see it says get children out.

45
00:02:30,300 --> 00:02:33,780
So we need to actually read through the name of this child names Ari.

46
00:02:33,930 --> 00:02:34,640
OK.

47
00:02:34,710 --> 00:02:39,520
And we need to actually get the value of the length of this array.

48
00:02:39,730 --> 00:02:40,060
OK.

49
00:02:40,080 --> 00:02:41,200
And then return That's right.

50
00:02:41,220 --> 00:02:45,420
So here I can just type in child names dot Len.

51
00:02:45,800 --> 00:02:46,600
OK.

52
00:02:46,950 --> 00:02:51,280
And here as you can see if you have another MF it gets group OK.

53
00:02:51,390 --> 00:02:55,050
So this method actually returns a value of type Object.

54
00:02:55,050 --> 00:02:55,500
OK.

55
00:02:55,590 --> 00:02:57,550
And the name of this method is get group.

56
00:02:57,750 --> 00:03:02,970
And this if it actually accepts an argument of type integer and the name of this argument is group or

57
00:03:03,020 --> 00:03:03,890
position.

58
00:03:03,990 --> 00:03:10,950
So here we need to actually return the values that are inside of this get group names.

59
00:03:11,010 --> 00:03:15,820
OK so here I can just typing that actually did it this null here.

60
00:03:16,090 --> 00:03:18,380
Return group names.

61
00:03:18,710 --> 00:03:19,520
OK.

62
00:03:20,160 --> 00:03:22,990
Sup group position.

63
00:03:23,250 --> 00:03:29,280
So it's going to actually return the specific value that is inside of the specific position specific

64
00:03:29,340 --> 00:03:31,660
index actually of these Adli.

65
00:03:31,740 --> 00:03:32,410
OK.

66
00:03:32,640 --> 00:03:35,440
First we are referring to the name of this group names Aure.

67
00:03:35,760 --> 00:03:41,880
And then we are actually referring to this specific index or position.

68
00:03:42,270 --> 00:03:44,270
That is actually that is the inside of this at it.

69
00:03:44,280 --> 00:03:47,140
OK for example a sports computer food car or TV.

70
00:03:47,240 --> 00:03:47,790
OK.

71
00:03:47,820 --> 00:03:55,950
So if you are returning that specific value OK from this method get group and we have our Get child

72
00:03:55,950 --> 00:04:02,400
here and this method actually accepts our two arguments and this if actually returns a value of type

73
00:04:02,490 --> 00:04:03,130
Object.

74
00:04:03,180 --> 00:04:10,640
So here as you can see we need to actually return the values that are inside of these type names Ari.

75
00:04:10,690 --> 00:04:11,270
OK.

76
00:04:11,430 --> 00:04:14,550
So as you can see this is actually a two dimensional array.

77
00:04:14,610 --> 00:04:19,200
So here for this method I can just return to the name of that of a child names.

78
00:04:19,320 --> 00:04:20,050
OK.

79
00:04:20,070 --> 00:04:24,830
Stop as you can see we you have two arguments group position type position.

80
00:04:24,990 --> 00:04:27,430
So I can just type in group position.

81
00:04:27,900 --> 00:04:28,970
OK.

82
00:04:29,040 --> 00:04:32,730
Stop Child position.

83
00:04:33,060 --> 00:04:36,110
OK so this is actually the row and this is the column.

84
00:04:36,120 --> 00:04:42,060
So for example if we assigned the value 0 for this group position OK it's going to go inside of these

85
00:04:42,440 --> 00:04:43,200
tightenings.

86
00:04:43,230 --> 00:04:45,930
So this is the element zero.

87
00:04:45,960 --> 00:04:46,510
OK.

88
00:04:46,540 --> 00:04:47,540
Index 0.

89
00:04:47,730 --> 00:04:55,080
And if if we actually assign the value 0 for this child position is going to return this value boxing

90
00:04:55,470 --> 00:04:56,070
to us.

91
00:04:56,070 --> 00:04:56,820
OK.

92
00:04:57,360 --> 00:05:02,300
So in this if you are actually returning the value used other inside of these or child names.

93
00:05:02,310 --> 00:05:03,980
Aure OK good child.

94
00:05:04,250 --> 00:05:08,090
And we have another Meffert as you can see here gets group ID.

95
00:05:08,120 --> 00:05:11,180
So here I could just return to group position.

96
00:05:11,180 --> 00:05:12,050
That's OK.

97
00:05:12,290 --> 00:05:19,700
So at the group position is the group ID the actually the index of our values inside of this group names.

98
00:05:19,700 --> 00:05:20,290
OK.

99
00:05:20,540 --> 00:05:24,120
So these for example this is index 0 1 2 3 4.

100
00:05:24,230 --> 00:05:27,660
So these values would be the ID for these groupings.

101
00:05:27,680 --> 00:05:28,250
OK.

102
00:05:28,640 --> 00:05:36,010
So here as you can see I just returned to this group position and we have a child ID here.

103
00:05:36,050 --> 00:05:41,930
As you can see here and as you can see for the Smurfette get child I.D. You have these child position

104
00:05:41,960 --> 00:05:43,080
as an argument.

105
00:05:43,100 --> 00:05:47,670
So if you could just retain that value returned child position.

106
00:05:47,960 --> 00:05:48,730
OK.

107
00:05:49,130 --> 00:05:49,360
OK.

108
00:05:49,370 --> 00:05:55,290
So at this point he's going to return the specific index that are inside of this tightenings.

109
00:05:55,310 --> 00:05:59,570
Ari for example index 0 1 2 free and other values.

110
00:05:59,570 --> 00:06:00,090
OK.

111
00:06:00,320 --> 00:06:05,810
So these are these are the columns and these are as you can see these arrows are actually the laws that

112
00:06:05,870 --> 00:06:07,910
are inside of these child names Aure.

113
00:06:08,200 --> 00:06:08,580
OK.

114
00:06:08,630 --> 00:06:13,460
So if you are just returning to the index of the child position.

115
00:06:13,460 --> 00:06:14,030
OK.

116
00:06:14,120 --> 00:06:16,290
So these are the children of these.

117
00:06:16,300 --> 00:06:16,550
OK.

118
00:06:16,580 --> 00:06:21,850
These columns boxing kickboxing judo football basketball and other bodies.

119
00:06:22,070 --> 00:06:29,020
So here are as you can see we have this I.D. And here we have these has stable IDs.

120
00:06:29,180 --> 00:06:32,170
So the default implementation for this method is enough.

121
00:06:32,380 --> 00:06:33,230
OK.

122
00:06:33,560 --> 00:06:36,370
We don't need to actually override this method again.

123
00:06:36,590 --> 00:06:43,130
And here we don't and you actually are putting our own implementations.

124
00:06:43,310 --> 00:06:49,390
OK so now and as you can see here we can actually go to the web browser.

125
00:06:49,500 --> 00:06:50,060
OK.

126
00:06:50,280 --> 00:06:55,470
And he had as you can see this is our expandable adapter class and now I can actually search for the

127
00:06:55,470 --> 00:07:01,260
name of that specific Misfit's that I want to actually see the actually the description of that method.

128
00:07:01,260 --> 00:07:01,790
OK.

129
00:07:01,950 --> 00:07:07,340
So here I could just press on hold the command key and then press on the letter F on my keyboard.

130
00:07:07,560 --> 00:07:11,970
If you are using a Windows machine you need to actually hold the control key and and press on the letter

131
00:07:12,000 --> 00:07:13,570
F on your keyboard.

132
00:07:13,620 --> 00:07:19,380
And here inside the search bar as you can see I can get you to test for my specific methods has stable

133
00:07:19,590 --> 00:07:22,340
stable IDs.

134
00:07:22,620 --> 00:07:27,540
And as you can see here this is Meffert and this is actually an abstract method and the return type

135
00:07:28,050 --> 00:07:34,780
of this method actually is boolean and it says indicates there the height and group ids are stable across

136
00:07:34,890 --> 00:07:36,990
changes to the to the underlying data.

137
00:07:37,080 --> 00:07:39,910
OK so this is the description of the Smurfit OK.

138
00:07:39,990 --> 00:07:42,770
Let's actually go to the Android studio your ID.

139
00:07:42,870 --> 00:07:45,320
So we don't need to actually override.

140
00:07:45,390 --> 00:07:48,190
Actually we don't need to put our own implementations here.

141
00:07:48,240 --> 00:07:49,750
OK so let's see what.

142
00:07:49,760 --> 00:07:50,920
What is the other in my.

143
00:07:51,180 --> 00:07:53,350
And we have this great group view.

144
00:07:53,700 --> 00:07:54,280
OK.

145
00:07:55,690 --> 00:08:00,130
And here as you can see if it actually returns a value of type view.

146
00:08:00,260 --> 00:08:00,810
OK.

147
00:08:01,090 --> 00:08:04,410
And this my friend actually accepts some arguments.

148
00:08:04,420 --> 00:08:08,100
So the first argument is a group position of type integer.

149
00:08:08,110 --> 00:08:12,020
The second argument is is expanded boolean.

150
00:08:12,190 --> 00:08:14,690
The first argument is convert's view view.

151
00:08:14,710 --> 00:08:21,050
So let's actually change the name of this argument to view and the first argument is the parent.

152
00:08:21,200 --> 00:08:24,810
OK so if we have these values as an argument of the Smurfette.

153
00:08:25,000 --> 00:08:25,530
OK.

154
00:08:25,960 --> 00:08:28,110
So let's actually implement this method here.

155
00:08:28,120 --> 00:08:33,040
So now I would actually pasting some lines of code here and then I'm going to explain to you what's

156
00:08:33,040 --> 00:08:34,530
going on here.

157
00:08:34,570 --> 00:08:38,890
So as you can see here we have actually pasted these lines of code here.

158
00:08:38,920 --> 00:08:39,650
OK.

159
00:08:40,030 --> 00:08:45,720
And as you can see we don't need this line of code written on here and here first about in line sixty

160
00:08:45,740 --> 00:08:46,620
eight.

161
00:08:46,690 --> 00:08:53,790
I actually created an object of type text view and the name of this object is TXI The View assignment

162
00:08:53,830 --> 00:08:54,840
operator new.

163
00:08:54,850 --> 00:08:58,360
Here I am initializing this object takes view context.

164
00:08:58,480 --> 00:09:01,780
So this takes view here as you can see this constructor.

165
00:09:01,780 --> 00:09:06,350
The constructor of this text view class actually needs the context.

166
00:09:06,400 --> 00:09:11,800
OK so I just assigned this context object that I actually declared inside of this class as you can see

167
00:09:11,800 --> 00:09:15,750
here in line 21 and here in line.

168
00:09:15,830 --> 00:09:20,200
I-69 I actually want to set some takes to this text view.

169
00:09:20,280 --> 00:09:20,720
OK.

170
00:09:20,800 --> 00:09:23,980
So takes the view that it takes group names.

171
00:09:24,100 --> 00:09:27,750
So this nymphet gets confused when I try to return to us.

172
00:09:27,940 --> 00:09:32,700
These are the values these group names as you can see here.

173
00:09:32,710 --> 00:09:33,270
OK.

174
00:09:33,610 --> 00:09:35,590
Sports computer TV.

175
00:09:35,590 --> 00:09:36,010
OK.

176
00:09:36,070 --> 00:09:40,740
So this Lifford is actually returning these values to the college of this method.

177
00:09:40,750 --> 00:09:41,280
OK.

178
00:09:41,560 --> 00:09:48,690
So we can see that this method is going to be called on each iteration of these values.

179
00:09:48,910 --> 00:09:49,380
OK.

180
00:09:49,420 --> 00:09:51,930
Sports computer food court TV.

181
00:09:51,940 --> 00:09:55,270
OK so if the name of this is get group view.

182
00:09:55,450 --> 00:09:55,760
OK.

183
00:09:55,780 --> 00:09:57,240
So these are the group views.

184
00:09:57,460 --> 00:09:58,040
OK.

185
00:09:58,270 --> 00:10:01,380
And we actually created a text for you as you can see here.

186
00:10:02,080 --> 00:10:03,460
That said text group names.

187
00:10:03,460 --> 00:10:05,910
So I actually referred to these are group names.

188
00:10:05,960 --> 00:10:12,040
Ari as you can see here these are the values that are inside of this emulator as you can see here and

189
00:10:12,040 --> 00:10:15,950
here I actually put in a pair a pair of brackets.

190
00:10:16,030 --> 00:10:17,950
Group position as you can see here.

191
00:10:17,950 --> 00:10:23,530
So it's going to get you to return the specific value that is inside of this specific index or a specific

192
00:10:23,530 --> 00:10:25,200
position of this group names.

193
00:10:25,600 --> 00:10:27,560
OK so you can see these values here.

