1
00:00:00,240 --> 00:00:04,610
So now let's actually go to our activity and linemen that examined here.

2
00:00:04,800 --> 00:00:08,640
And now let's actually add some more user interface components here.

3
00:00:08,880 --> 00:00:15,120
So now if I show you the other web browser here as you can see here we have the vote to actually get

4
00:00:15,120 --> 00:00:16,630
the value of this child.

5
00:00:16,650 --> 00:00:17,140
Right.

6
00:00:17,280 --> 00:00:23,180
So let's actually create a text view for this child here and now let's go back to our Android studio.

7
00:00:23,190 --> 00:00:28,480
So let me actually get this takes you here and put it here inside this linearly elsewheres the call

8
00:00:28,680 --> 00:00:30,450
and below the spot in here.

9
00:00:30,480 --> 00:00:31,030
Right.

10
00:00:31,180 --> 00:00:40,490
And now for the ID just a pin here to 60 child value and then present interviewee on your keyboard.

11
00:00:40,830 --> 00:00:44,340
And now let's actually drag a button here.

12
00:00:44,640 --> 00:00:47,450
As you can see inside it's widgets folder we have this button.

13
00:00:47,490 --> 00:00:55,370
So just drag it and put it here below this takes view and for the I-T just tape in here between B.T.

14
00:00:55,500 --> 00:01:03,780
and get child value right BT and get child value and that person until you're on your keyboard.

15
00:01:03,780 --> 00:01:14,580
And for the text attributes of this button to step in here get child value and that person Enter key

16
00:01:14,580 --> 00:01:15,910
on your keyboard.

17
00:01:16,650 --> 00:01:19,950
And now let me actually show you their web browser here.

18
00:01:20,010 --> 00:01:24,470
So as you can see here we have this key and we have this value right.

19
00:01:24,480 --> 00:01:28,110
So let's also create another takes and another button for this.

20
00:01:28,230 --> 00:01:29,490
A key value here.

21
00:01:29,670 --> 00:01:31,670
So let's go back to our Android studio.

22
00:01:31,770 --> 00:01:37,650
Inside these widgets folder just selectees takes you here and put it here inside this linearly vertical

23
00:01:37,950 --> 00:01:39,530
and below the Spartan.

24
00:01:39,990 --> 00:01:51,180
And now for the idea just step in here takes the computer takes the computer name and for the text attribute

25
00:01:51,450 --> 00:01:57,260
just typing in here just deletes this right here.

26
00:01:57,260 --> 00:01:58,320
Right.

27
00:01:58,410 --> 00:02:05,060
And this Atlas also selectees takes you here and read the text of this or actually takes you.

28
00:02:05,120 --> 00:02:08,960
And now as you can see if you have this takes you here right.

29
00:02:08,960 --> 00:02:10,350
Takes the computer name.

30
00:02:10,440 --> 00:02:12,430
So let's actually do like a button here.

31
00:02:12,510 --> 00:02:14,000
Inside the switch it's for.

32
00:02:14,100 --> 00:02:19,760
Just select it and put it here inside this linearly or two vertical and below these takes you.

33
00:02:19,890 --> 00:02:29,400
Now for the ID just type in here between jet computer name the computer name and that person into your

34
00:02:29,400 --> 00:02:30,000
keyboard.

35
00:02:30,150 --> 00:02:38,350
And for the text attribute to step in here gets a computer name enter and then.

36
00:02:38,350 --> 00:02:43,630
Here let me show you the web browser as you can see we have also this Keeble you hear more widening.

37
00:02:43,830 --> 00:02:46,020
So let's actually go back to android studio.

38
00:02:46,110 --> 00:02:51,860
Let's actually select this takes here inside this vitiates folder and put it here below this button.

39
00:02:52,190 --> 00:03:01,980
And now for the Id just say in here to the ATX demobilised name and that person into on your keyboard

40
00:03:02,370 --> 00:03:09,330
and deletes that the text attributes as you can see that it does takes here and now let's actually write

41
00:03:09,390 --> 00:03:10,220
about it here.

42
00:03:10,230 --> 00:03:14,580
As you can see in say this with its There's just put it here below this text view.

43
00:03:14,820 --> 00:03:23,700
And for the ID just step in here between get more by learning more by name and then it's actually just

44
00:03:24,150 --> 00:03:26,100
for the text attribute of this button.

45
00:03:26,100 --> 00:03:35,030
Just type in here get more byde name and in person entelechy on your keyboard.

46
00:03:35,120 --> 00:03:43,820
So an analyst actually wrote our project in order to show you actually the face of our application and

47
00:03:43,850 --> 00:03:47,500
now as you can see here this is our emulator.

48
00:03:47,630 --> 00:03:53,870
So we added these to these three buttons get child value get computer names get more by name and we

49
00:03:53,870 --> 00:03:55,480
have also free takes views.

50
00:03:55,580 --> 00:03:58,180
But we can see those values here yet.

51
00:03:58,190 --> 00:04:04,720
So let's actually go back to our main activity the double file here and now inside the uncreate Smurfette.

52
00:04:04,790 --> 00:04:10,940
So before the end in curly brace of this uncreate Smurfit as you can see here now as you can see this

53
00:04:10,940 --> 00:04:12,420
is our uncreate method right.

54
00:04:12,530 --> 00:04:19,460
So before the Indian curly brace of this uncreate Smurfit I can actually declare those objects right.

55
00:04:19,460 --> 00:04:26,540
First of all as you can see inside the emulator we have actually this high value button and we have

56
00:04:26,540 --> 00:04:28,210
also a text view.

57
00:04:28,220 --> 00:04:36,620
So let's actually first of all create the text you so text view the child assignment operator and then

58
00:04:36,620 --> 00:04:44,510
I need to cast this object to actually a text view object find view by ID or that ID that takes the

59
00:04:44,690 --> 00:04:46,860
child as you can see here.

60
00:04:46,970 --> 00:04:47,370
Right.

61
00:04:47,390 --> 00:04:52,420
Takes the child by you and then put a semi-colon at the end at the end of your statement.

62
00:04:52,730 --> 00:04:56,650
And now as you can see we have also the spot in good child value.

63
00:04:56,750 --> 00:04:58,390
So let's create a button here.

64
00:04:58,400 --> 00:05:06,530
So pattern between child assignment operator and then it's actually cestus object to about an object

65
00:05:06,900 --> 00:05:14,870
find view by ID or that ID that Pythian child as you can see here between a child value added with a

66
00:05:14,870 --> 00:05:17,800
semicolon at the end of your statement.

67
00:05:18,220 --> 00:05:25,200
Now as you can see here we have these kids computer name so let's actually first of all create the text.

68
00:05:25,240 --> 00:05:32,850
So it takes few takes the computer name takes the computer name and an assignment operator.

69
00:05:32,990 --> 00:05:39,430
And here it is like let's actually cast this object to our tastes view object find view by ID or that

70
00:05:39,530 --> 00:05:46,370
ID that takes the computer name and then put a semi-colon at the end of your statement.

71
00:05:46,370 --> 00:05:48,790
And here as you can see we have this button right.

72
00:05:48,890 --> 00:05:57,850
Computer Name so button Pythian computer name between a computer and an assignment operator.

73
00:05:57,980 --> 00:06:08,570
And now let's actually cast this object to a button object find view by ID or that Id dot PTEN computer

74
00:06:08,600 --> 00:06:13,140
name and get computer name and then put a semicolon at the end of your statement.

75
00:06:13,340 --> 00:06:16,140
And we have also a text for this by name.

76
00:06:16,190 --> 00:06:20,640
So takes few takes the more widely.

77
00:06:20,860 --> 00:06:23,550
Well when the assignment operator.

78
00:06:23,660 --> 00:06:31,010
And now let's actually test this object to our test view object find the ID r that ID that takes the

79
00:06:31,310 --> 00:06:36,240
more by name and then put a semi-colon at the end of your statement.

80
00:06:36,270 --> 00:06:41,470
And now let's let's actually create an object for this button gets mobiling.

81
00:06:41,630 --> 00:06:49,190
So button between Moabite the assignment operator.

82
00:06:49,340 --> 00:06:51,900
Now let's actually test this object to a button object.

83
00:06:52,000 --> 00:06:59,590
Find your way id or that ID that PTEN more by you get more by name and then put a semicolon at the end

84
00:06:59,590 --> 00:07:00,690
of your statement.

85
00:07:00,700 --> 00:07:05,850
So now let's actually create a listener for the spot in between and child.

86
00:07:05,860 --> 00:07:13,670
So here I can say PTEN child that said unclick listener new view.

87
00:07:13,690 --> 00:07:19,390
So just put a capital V here and then the auto companies feature of Android studio Studio is going to

88
00:07:19,420 --> 00:07:24,650
actually help you to choose this option onco like this and then press an interview on your keyboard.

89
00:07:24,800 --> 00:07:26,660
And now inside is unclear to me.

90
00:07:26,970 --> 00:07:28,950
I can't put my own logic here.

91
00:07:29,110 --> 00:07:35,110
So now first of all I want to actually get sooner let me show you the web browser I want to actually

92
00:07:35,110 --> 00:07:37,090
get the value of this child.

93
00:07:37,150 --> 00:07:37,560
Right.

94
00:07:37,660 --> 00:07:41,170
But as you can see here first of all we have this category Diski.

95
00:07:41,410 --> 00:07:47,710
So first I have to get the reference to the key to this category and then I can actually get a reference

96
00:07:47,710 --> 00:07:49,000
to this child.

97
00:07:49,090 --> 00:07:52,400
And after that I can actually get the value of this choice.

98
00:07:52,630 --> 00:07:55,310
So first we need a reference to this category.

99
00:07:55,420 --> 00:07:56,850
So let's do that here.

100
00:07:57,160 --> 00:08:04,780
So here I can just say for example firebase database thought Get reference.

101
00:08:04,820 --> 00:08:07,720
So now let's actually open our web browser as it kids here.

102
00:08:07,730 --> 00:08:09,800
First we need to get this right.

103
00:08:09,800 --> 00:08:11,730
First we need to get other friends to Diski.

104
00:08:11,900 --> 00:08:16,930
So let's actually copy this key here just like let's click on it and then click on copy.

105
00:08:17,300 --> 00:08:21,900
Let's go back to what I understood you and instead of double quotes just paste that disvalue.

106
00:08:22,170 --> 00:08:25,230
And now we can actually access the child.

107
00:08:25,310 --> 00:08:28,410
So here I can say that child.

108
00:08:28,670 --> 00:08:33,430
And then inside the double quotes as you can see here I can actually put the key which is actually the

109
00:08:33,430 --> 00:08:38,570
child so just highlighted and then right click on it and then just click on.

110
00:08:38,570 --> 00:08:39,510
Copy.

111
00:08:39,560 --> 00:08:45,080
Let's actually go back to and read through and paste this value so now that it actually successfully

112
00:08:45,080 --> 00:08:47,570
accessed the child of this key.

113
00:08:47,900 --> 00:08:51,900
So I put this value to the key here as the child.

114
00:08:52,250 --> 00:08:53,900
And then I can access this by you.

115
00:08:54,080 --> 00:08:55,940
And here I can see that.

116
00:08:55,970 --> 00:09:02,300
And now I need to actually create actually an add value listener here in order to see whether this value

117
00:09:02,300 --> 00:09:03,260
is changed or not.

118
00:09:03,260 --> 00:09:08,890
Or we can actually get the value of that key here and say Dot add value listener.

119
00:09:08,990 --> 00:09:15,360
So first let's actually create a new line here so that you can see these values that add the radio listener.

120
00:09:15,650 --> 00:09:17,480
And here I can see new.

121
00:09:17,600 --> 00:09:22,890
And then just hold the shift key on your keyboard and then present the reader the key on your keyboard.

122
00:09:22,890 --> 00:09:27,320
And now the autocomplete feature of the Android studio is going to help you to choose this option and

123
00:09:27,320 --> 00:09:30,010
that person and until key on your keyboard.

124
00:09:30,140 --> 00:09:34,480
And finally we need to actually put a semicolon after this and prentices.

125
00:09:34,810 --> 00:09:37,140
So insert this update or change method.

126
00:09:37,310 --> 00:09:39,350
We can actually put our own logic here.

127
00:09:39,440 --> 00:09:40,090
Right.

128
00:09:40,130 --> 00:09:47,420
So this is going to be called an effort that you actually change the value of this key.

129
00:09:47,600 --> 00:09:48,320
Right.

130
00:09:48,350 --> 00:09:53,300
So here we can actually get these values because this value is actually a string value as you can see

131
00:09:53,300 --> 00:09:54,780
here instead of double quotes.

132
00:09:54,830 --> 00:09:56,730
We can actually create a single variable.

133
00:09:56,840 --> 00:10:01,200
So I think we can see a string value assignment operator.

134
00:10:01,590 --> 00:10:05,280
So now let me actually just put the right name here.

135
00:10:05,330 --> 00:10:07,690
So string value.

136
00:10:07,780 --> 00:10:14,990
And now I can't say it I can't say data snapshot DOT gets value semicolon.

137
00:10:14,990 --> 00:10:19,340
And inside the parenthesis as you can see here as I said get key.

138
00:10:19,380 --> 00:10:20,840
We can also get the key.

139
00:10:20,930 --> 00:10:23,170
But here we want to actually get the value.

140
00:10:23,300 --> 00:10:25,080
So get value.

141
00:10:25,580 --> 00:10:32,150
And inside the parenthesis because we need to actually specify the data type of the value that we want

142
00:10:32,150 --> 00:10:38,270
to get from the set from the server when inside the prentices we need to specify the data types in that

143
00:10:38,270 --> 00:10:40,190
class.

144
00:10:40,190 --> 00:10:46,320
And here I can say he asks the child that said text value.

145
00:10:46,360 --> 00:10:49,350
So now let's actually run our project and see what happens.

146
00:10:51,460 --> 00:10:55,410
And now let me show you the web browser and let me show you the emulator.

147
00:10:55,630 --> 00:11:00,200
So now as you can see here our application is actually running on this emulator.

148
00:11:00,220 --> 00:11:04,550
So now let's actually click on the Spartan get child value.

149
00:11:05,200 --> 00:11:08,360
And now here as you can see it says value right.

150
00:11:08,380 --> 00:11:10,430
We are getting the value of this child.

151
00:11:10,540 --> 00:11:12,710
So let's actually change this value to another value.

152
00:11:12,710 --> 00:11:24,290
Here we can say my own my own value here and in person in the your keyboard.

153
00:11:24,520 --> 00:11:30,670
As you can see I changed the value of this child and now you can see this value here also my own value

154
00:11:30,670 --> 00:11:31,380
here.

155
00:11:31,600 --> 00:11:32,380
Right.

156
00:11:32,410 --> 00:11:41,120
So if you successfully got this value and now let's actually go back to our Android studio so now let's

157
00:11:41,120 --> 00:11:43,910
actually go inside this uncreate method as you can see here.

158
00:11:43,910 --> 00:11:46,410
This is the end in calibrates of this uncreate method.

159
00:11:46,450 --> 00:11:46,970
Right.

160
00:11:47,180 --> 00:11:49,860
And this is the end in curly brace of this class.

161
00:11:49,880 --> 00:11:54,950
So before the end in curly brace of this uncreate Befort and inside is uncreate perfect.

162
00:11:55,010 --> 00:11:58,140
Let's create a listener for this button as you can see here.

163
00:11:58,280 --> 00:11:59,340
Good computer name.

164
00:11:59,510 --> 00:12:04,960
So now if I actually show you this web browser here as you can see we have computer named Mac Pro.

165
00:12:05,120 --> 00:12:08,430
So I want to actually get this Mac Pro here.

166
00:12:08,520 --> 00:12:17,930
So now let's create a listener so PTEN computer name that sits on click click listener new view that

167
00:12:17,990 --> 00:12:18,960
unclick listener.

168
00:12:19,190 --> 00:12:20,730
And now inside is Uncle Comerford.

169
00:12:20,750 --> 00:12:22,420
I can't say that.

170
00:12:22,610 --> 00:12:26,240
Let's actually create a reference to this computer name.

171
00:12:26,300 --> 00:12:30,630
So here I can say firebase database that gets reference friends.

172
00:12:30,650 --> 00:12:34,070
So instead of double quotes I can't specify the reference.

173
00:12:34,130 --> 00:12:36,070
So the reference is going to be disvalue.

174
00:12:36,080 --> 00:12:38,030
So let's actually copy this value here.

175
00:12:38,030 --> 00:12:39,700
Computer Name.

176
00:12:39,810 --> 00:12:42,620
So right click on it and then click on copy.

177
00:12:43,130 --> 00:12:47,810
And let's actually go to the Android studio and inside the double quotes you can actually paste this

178
00:12:47,810 --> 00:12:48,620
value.

179
00:12:48,860 --> 00:12:51,350
And here we can see that.

180
00:12:51,800 --> 00:12:53,800
And now we don't have a type.

181
00:12:53,840 --> 00:12:54,500
Right.

182
00:12:54,500 --> 00:12:56,530
This value here doesn't have a child.

183
00:12:56,600 --> 00:12:58,470
So we can directly get this value.

184
00:12:58,580 --> 00:13:05,650
So here I can say that at that add value event listener.

185
00:13:06,090 --> 00:13:16,740
And here as you can see I need to put the new key word here and here I can see with capital V as you

186
00:13:16,740 --> 00:13:22,050
can see the autocomplete feature of Android studio is helping me to choose this option value event listener

187
00:13:22,380 --> 00:13:24,590
and then person entelechy on your keyboard.

188
00:13:24,860 --> 00:13:29,400
And now as you can see here the autocomplete feature of Android studio put these lines of code here

189
00:13:29,400 --> 00:13:30,340
for us.

190
00:13:30,360 --> 00:13:35,240
So let me actually put this in another line so that you can see these values are better.

191
00:13:35,520 --> 00:13:40,040
And inside this update or change Mefford I can create a sync rowdier bell.

192
00:13:40,170 --> 00:13:45,030
And as you can see inside this web browser disvalue is instead of double quotes and it is actually an

193
00:13:45,390 --> 00:13:47,090
us think value match.

194
00:13:47,130 --> 00:13:47,880
Right.

195
00:13:47,940 --> 00:13:55,190
So here I can say strange and here the name of my variable could be for example value again.

196
00:13:55,380 --> 00:14:01,050
Assignment operator and here I referred to the name of the state snapshot that actually holds the value

197
00:14:01,050 --> 00:14:02,770
of this key computer name.

198
00:14:02,790 --> 00:14:06,530
So it's a snapshot that gets value.

199
00:14:07,000 --> 00:14:07,920
Semicolon.

200
00:14:08,070 --> 00:14:11,480
And here inside the practice's because this is going to be of type string.

201
00:14:11,520 --> 00:14:18,360
I can say it's strange that class and here I can actually just refer to the name of this takes the more

202
00:14:18,360 --> 00:14:20,060
but takes the computer name.

203
00:14:20,190 --> 00:14:22,680
That's a text value.

204
00:14:23,210 --> 00:14:30,890
OK so now let's run our project and now let me show you the web browser and the emulator.

205
00:14:30,960 --> 00:14:32,660
So let's wait a little bit here.

206
00:14:32,820 --> 00:14:36,900
And I was the case here our application is actually running on the simulator.

207
00:14:36,900 --> 00:14:41,070
So now let's actually click on the spot and get a computer name.

208
00:14:41,500 --> 00:14:44,260
And now as you can see here it says Match which pro.

209
00:14:44,280 --> 00:14:44,850
Right.

210
00:14:45,150 --> 00:14:49,520
So now let's actually change this value match with pro to match.

211
00:14:50,800 --> 00:14:54,600
And that person entered on your keyboard in order to update this value.

212
00:14:54,630 --> 00:14:58,660
And now as you can see here inside the emulator it says matchbook error.

213
00:14:59,010 --> 00:14:59,800
Right.

214
00:14:59,820 --> 00:15:01,830
So hopefully that makes sense.

215
00:15:01,860 --> 00:15:08,850
And now let's actually go back to our Android studio and again inside the curly braces of this uncreate

216
00:15:08,870 --> 00:15:09,530
Smurfette.

217
00:15:09,540 --> 00:15:14,250
So before the Indian curly brace of this country is Meffert we need to actually create our listener

218
00:15:14,610 --> 00:15:16,940
for the spot and this time get more by name.

219
00:15:17,160 --> 00:15:27,290
So here I can say between mobiling that said unclick listener new view unclick new view that Uncle listener.

220
00:15:27,390 --> 00:15:33,140
Now as you can see here we have actually anonymous in a class that is implementing this unclick the

221
00:15:33,140 --> 00:15:38,340
center interface and it is actually providing all an implementation for this uncle Meffert.

222
00:15:38,460 --> 00:15:42,290
So here inside the Anglican if I can put my own logic here.

223
00:15:42,570 --> 00:15:48,000
So now I can say firebase database that gets reference.

224
00:15:48,030 --> 00:15:52,960
So now we need to actually get our reference to discrete as you can see here mobiling.

225
00:15:53,100 --> 00:15:55,030
So let's actually copy disvalue.

226
00:15:55,170 --> 00:16:01,310
So just selected and then right click on it and then click on copy and let's actually go to Android

227
00:16:01,350 --> 00:16:06,300
studio and here inside the parenthesis put two double quotes and inside the double quotes.

228
00:16:06,300 --> 00:16:08,400
Just paste this value my name.

229
00:16:08,700 --> 00:16:11,750
And as you can see we have this word is key here right.

230
00:16:11,760 --> 00:16:20,340
So here I can say that add value events listener knew of value even listener and now as you can see

231
00:16:20,340 --> 00:16:25,050
here you autocomplete feature or Android studio put these lines of code here for me.

232
00:16:25,050 --> 00:16:30,150
So let's actually put this line in a new line as you can see here so that you can see these values here

233
00:16:30,150 --> 00:16:31,720
pedir right.

234
00:16:31,800 --> 00:16:34,790
And we have this undated change method here again.

235
00:16:34,800 --> 00:16:43,720
And now I can actually create a strange variable value assignment operator data snapshot that gives

236
00:16:44,230 --> 00:16:50,700
you an insight Apprentice's I can't say strange that class and then put a semicolon at the end of your

237
00:16:50,700 --> 00:16:51,600
statement.

238
00:16:51,600 --> 00:16:58,510
And here I have said he is the more by name that set text value.

239
00:16:58,830 --> 00:17:01,860
And now let's actually run our project and see what happens.

240
00:17:02,250 --> 00:17:03,680
Let's actually open our Web browser.

241
00:17:03,690 --> 00:17:05,780
And now let me show you the emulator.

242
00:17:06,000 --> 00:17:08,700
So now let me click on the spot and get my name

243
00:17:11,550 --> 00:17:14,650
now as you can see here it says iPhone 7.

244
00:17:14,900 --> 00:17:21,020
So let's actually change this iPhone 7 to iPhone 5 and then person energy on your keyboard.

245
00:17:21,120 --> 00:17:24,380
And now as you can see here it is iPhone 5 here also.

246
00:17:24,800 --> 00:17:28,690
So now we're actually getting these values here easily right.

247
00:17:28,700 --> 00:17:29,730
It is really simple.

248
00:17:29,960 --> 00:17:35,400
We just need to put some lines of code and you can see that it's really fairly simple.

249
00:17:35,720 --> 00:17:41,360
So now what happens if we actually create multiple tiles here.

250
00:17:41,540 --> 00:17:44,650
So for example let's say for example I want to add a child here.

251
00:17:44,840 --> 00:17:48,800
So now I actually need to specify the name.

252
00:17:48,830 --> 00:17:58,310
So here I can say Child 1 or I can say for example something for the name and because I want to create

253
00:17:58,370 --> 00:18:03,980
another child for this child I don't have to actually provide a value for this trial so I just need

254
00:18:03,980 --> 00:18:12,320
to click on this plus button here and here I can say something else right something else and then I'm

255
00:18:12,410 --> 00:18:14,960
able to actually create another child for this child.

256
00:18:15,140 --> 00:18:20,520
And here I can say for example I think.

257
00:18:20,690 --> 00:18:21,130
Right.

258
00:18:21,260 --> 00:18:23,260
And then I want to create another child.

259
00:18:23,480 --> 00:18:32,160
And here I can say for example key and here I can specify the value and then click on it.

260
00:18:32,630 --> 00:18:36,140
So now as you can see here we have a child or something.

261
00:18:36,200 --> 00:18:43,590
And this child also has another child something else and this child hears something else also has an

262
00:18:43,590 --> 00:18:46,190
older child with his which is actually fine.

263
00:18:46,490 --> 00:18:51,870
And this Fink here has another child which is this key that has a value.

264
00:18:51,920 --> 00:18:55,110
So how we can actually get this value right.

265
00:18:55,160 --> 00:18:58,190
So now let's actually go back to our Android studio.

266
00:18:58,430 --> 00:19:04,480
Let's go back to our activity on the line minute segment here and now as you can see I want to actually

267
00:19:04,490 --> 00:19:06,590
get the value of this key right.

268
00:19:06,590 --> 00:19:11,060
So let's actually actually get a text view here from this widgets folder.

269
00:19:11,060 --> 00:19:17,550
Just select it and put it here inside these linear layouts vertical and below the Spartan and for the

270
00:19:17,550 --> 00:19:18,820
idea just step in here.

271
00:19:18,920 --> 00:19:27,850
TIA XTi my value for example takes the my value and then lets actually just write another button here.

272
00:19:27,860 --> 00:19:30,560
So just select this button and put it here.

273
00:19:30,560 --> 00:19:31,790
Below this text view.

274
00:19:31,850 --> 00:19:34,370
And inside is linearly alphabetical.

275
00:19:34,760 --> 00:19:42,770
And here for this Id just type in here between my value and in person.

276
00:19:42,780 --> 00:19:47,450
It helps you on your keyboard and here for the text attribute of the Spartan.

277
00:19:47,480 --> 00:19:56,760
Just type in here for example get my value and that person into a key on your keyboard.

278
00:19:56,780 --> 00:20:00,010
So let's actually go back to our main activity our job right here.

279
00:20:00,020 --> 00:20:05,090
So again let's actually go inside this uncreate method as you can see here at the top it says and creates

280
00:20:05,090 --> 00:20:11,180
Meffert for they actually hover over this and curly brace as you can see it says uncreate Meffert.

281
00:20:11,180 --> 00:20:16,310
So inside this uncreate method it over to actually create those objects first of all we have a takes

282
00:20:16,460 --> 00:20:24,030
takes you right so takes the my value assignment operator and then I need to cast this object to uptakes

283
00:20:24,040 --> 00:20:30,840
view object find your ID are that Id dot he see my value right.

284
00:20:30,920 --> 00:20:33,680
And then I need to put a semicolon at the end of my statement.

285
00:20:33,830 --> 00:20:43,440
And then let's actually create a button so button between my value and then I put an assignment operator

286
00:20:43,440 --> 00:20:46,860
here and then I need to cast this object to our button object.

287
00:20:46,860 --> 00:20:52,920
Find your way Id are that Id dot between BT and my body.

288
00:20:53,430 --> 00:20:55,850
And then put a semicolon at the end of your statement.

289
00:20:55,860 --> 00:21:02,310
So now let's actually create our listener for the spot in between my value that sits on click listener

290
00:21:03,480 --> 00:21:11,250
new view that unclick listener and now inside is Uncle Mefford here I'm going to actually show you something

291
00:21:11,250 --> 00:21:12,170
really important.

292
00:21:12,180 --> 00:21:15,090
So let me open the web browser here.

293
00:21:15,810 --> 00:21:18,150
As you can see here we have something here.

294
00:21:18,150 --> 00:21:18,610
Right.

295
00:21:18,750 --> 00:21:23,380
And inside is something we have something else inside is something else we have this feeling.

296
00:21:23,490 --> 00:21:26,580
And inside these screens we have this key and value.

297
00:21:26,580 --> 00:21:28,790
So how we can access this value.

298
00:21:28,920 --> 00:21:34,080
It's very important as you can see here it is you are in here as you can see I select it right.

299
00:21:34,080 --> 00:21:35,620
This is actually you are at right.

300
00:21:35,630 --> 00:21:38,460
So now let me click on this key here.

301
00:21:38,940 --> 00:21:41,160
As you can see this you are all here changed.

302
00:21:41,250 --> 00:21:42,170
Right.

303
00:21:42,300 --> 00:21:49,520
So now it says this you are in slash something slash something else slash fiend slash key.

304
00:21:49,620 --> 00:21:56,280
So it says that in this instance database instance we have something inside is something we have something

305
00:21:56,280 --> 00:21:59,620
else inside is something else we have this field.

306
00:21:59,820 --> 00:22:02,010
And inside this field we have this key.

307
00:22:02,280 --> 00:22:09,240
So in other words we have actually our reference to this key as you can see it says key value.

308
00:22:09,270 --> 00:22:13,420
So now if we click on this you are in here as you can see this is actually a reference right.

309
00:22:13,440 --> 00:22:16,900
We already have a reference to this database here.

310
00:22:16,950 --> 00:22:23,610
Let me actually just highlighted here so that you can see we already have a reference to this database

311
00:22:23,850 --> 00:22:28,890
but we also want a reference to something and then we want to add a reference to the something else.

312
00:22:28,980 --> 00:22:31,980
And then we want a reference to this field and is key.

313
00:22:32,190 --> 00:22:38,820
So we can add to the capitis value here something slash something else slash slash chie.

314
00:22:39,000 --> 00:22:42,310
So just right click on it and then click on copy.

315
00:22:42,630 --> 00:22:48,870
And now let's actually go back to what Android studio and inside this analyst Meffert I can say firebase

316
00:22:48,870 --> 00:22:52,860
database but get the reference.

317
00:22:52,950 --> 00:22:59,070
So this firebase entire database already actually contains a reference to our instance which is this

318
00:22:59,070 --> 00:22:59,470
one.

319
00:22:59,730 --> 00:23:04,340
But we want a reference to this key right because you want to get the value of this key.

320
00:23:04,350 --> 00:23:10,170
So I want a reference to is key inserted practices of this get reference Smurfette just put two double

321
00:23:10,170 --> 00:23:14,800
quotes and then just paste this value here something.

322
00:23:15,060 --> 00:23:16,440
Slash something else.

323
00:23:16,540 --> 00:23:18,720
Slash slash cheat.

324
00:23:19,230 --> 00:23:21,120
So now let me show you the web browser.

325
00:23:21,120 --> 00:23:25,800
Now that metrically click on this database instance which is actually the name of her application.

326
00:23:26,250 --> 00:23:33,660
And now as you can see I created are you Arel and if you already have access to this instance Salvini

327
00:23:33,680 --> 00:23:34,990
to access this something.

328
00:23:35,040 --> 00:23:40,830
So I put this something here inside the practices and inside double quotes first I put this something

329
00:23:41,070 --> 00:23:46,230
slash and then you want to access something else again something else.

330
00:23:46,290 --> 00:23:47,340
Slash.

331
00:23:47,400 --> 00:23:49,570
And then we want to access this field.

332
00:23:49,770 --> 00:23:51,730
So slash field.

333
00:23:51,870 --> 00:23:55,970
And then we want to access these keys so that we can actually access this value right.

334
00:23:56,040 --> 00:24:02,810
So slash key and here I can say it at value event listener.

335
00:24:03,090 --> 00:24:03,490
Right.

336
00:24:03,510 --> 00:24:09,690
I am actually creating a listener for this key because I can actually access this key so I can actually

337
00:24:09,690 --> 00:24:17,790
create an add value center here so that we can see this value and add value eventless and how new view

338
00:24:18,200 --> 00:24:22,620
the new value event listener and then person into on your keyboard.

339
00:24:22,620 --> 00:24:28,230
So now let me actually create a new line here so that you can see these values here.

340
00:24:28,380 --> 00:24:29,230
As you can see.

341
00:24:29,370 --> 00:24:35,430
So now we need to actually put a semicolon here and now we have this update or change my fifth.

342
00:24:35,580 --> 00:24:40,310
And here I can actually create a single ridable string.

343
00:24:40,580 --> 00:24:42,670
Why do you assignment operator.

344
00:24:42,900 --> 00:24:52,540
And here I can say for example a snapshot start to get value and put a semicolon at the end of your

345
00:24:52,540 --> 00:24:57,650
statement and inside the parenthesis because this is going to be a string value just like in here string

346
00:24:57,700 --> 00:24:59,760
that class.

347
00:25:00,220 --> 00:25:00,830
Right.

348
00:25:00,880 --> 00:25:07,930
And here I can say it takes the mind value that said text value right.

349
00:25:08,200 --> 00:25:11,830
Now let's actually run our project and see what happens.

350
00:25:11,830 --> 00:25:17,230
Now let me show you the web browser and the emulator here.

351
00:25:17,240 --> 00:25:20,690
So now as you can see our application is running on the simulator.

352
00:25:20,840 --> 00:25:23,950
So now let's actually click on the spot and get more value.

353
00:25:24,320 --> 00:25:26,510
And now as you can see here it says value.

354
00:25:26,510 --> 00:25:30,210
So if we successfully accessed the value of this key.

355
00:25:30,230 --> 00:25:31,990
Right.

356
00:25:32,060 --> 00:25:35,780
So I think that's enough for this year.

357
00:25:35,810 --> 00:25:41,360
So if you have any questions about the concepts that are hard to you in this lesson please what's the

358
00:25:41,360 --> 00:25:44,880
discussion in the course and then I do my best to answer all of your questions.

359
00:25:44,900 --> 00:25:47,420
Thank you very much for watching and I'll see you in the next year.

360
00:25:47,460 --> 00:25:47,830
Audiard.

