1
00:00:00,330 --> 00:00:05,440
So now as you can see our application is actually running on the emulator here.

2
00:00:05,490 --> 00:00:06,020
OK.

3
00:00:06,150 --> 00:00:13,170
And we can see these values inside of these linearly aesthetical and I can actually scroll down in order

4
00:00:13,170 --> 00:00:19,020
to see the other values and I can actually check these checkboxes here as you can see on here.

5
00:00:19,050 --> 00:00:24,600
As you can see here I can't check these radio buttons as you can see here.

6
00:00:24,600 --> 00:00:30,030
So now let's actually change the background color of this linearly out to our lighter color.

7
00:00:30,110 --> 00:00:30,680
OK.

8
00:00:30,810 --> 00:00:38,370
So here I can just go back and say this design type here and now I can actually select this linearly

9
00:00:38,370 --> 00:00:39,520
outwards Tikal here.

10
00:00:39,720 --> 00:00:47,370
And for the background attribute as you can see here you have these going out here silica is linearly

11
00:00:47,450 --> 00:00:52,230
out and for the background we can actually assign another value.

12
00:00:52,230 --> 00:01:02,320
For example hash tag F F F F and one to free and then press enter on your keyboard.

13
00:01:02,640 --> 00:01:08,590
And now as you can see the background color of our linearly aesthetical is actually changed.

14
00:01:08,680 --> 00:01:13,650
OK so now let's actually run our project again and see what happens.

15
00:01:13,650 --> 00:01:19,220
So as you can see in our application is running on the simulator and we can see these values here.

16
00:01:19,230 --> 00:01:19,740
OK.

17
00:01:20,040 --> 00:01:24,450
So I can get you to take these checkboxes and here I can get you to use the stick bar.

18
00:01:24,690 --> 00:01:30,720
I can actually rate here and here as you can see these are the radio radio buttons that are inside our

19
00:01:30,720 --> 00:01:31,300
radio group.

20
00:01:31,320 --> 00:01:31,860
OK.

21
00:01:31,920 --> 00:01:33,220
So I can take them here.

22
00:01:33,300 --> 00:01:33,850
OK.

23
00:01:34,200 --> 00:01:38,850
So now let's actually go back and say this main activity that are right here and now let's actually

24
00:01:38,850 --> 00:01:41,870
did it these lines of code that are related to the Options menu.

25
00:01:41,960 --> 00:01:45,800
OK so now we can actually put our own codes here.

26
00:01:45,920 --> 00:01:46,290
OK.

27
00:01:46,320 --> 00:01:51,750
So now I want to actually declare some objects inside is main activity class.

28
00:01:51,750 --> 00:01:56,400
So here I'm going actually pasting some lines of code here and then I'm going to explain to you what's

29
00:01:56,400 --> 00:01:57,560
going on here.

30
00:01:57,570 --> 00:02:01,060
So as you can see here these are the lines of code that they actually paste that here.

31
00:02:01,110 --> 00:02:01,740
OK.

32
00:02:02,040 --> 00:02:07,920
And here as you can see I actually did yclept six check actually eight checkbox objects OK checkbox

33
00:02:07,950 --> 00:02:11,430
number one number two number three number four number five.

34
00:02:11,430 --> 00:02:17,370
Number six seven eight and actually declared an object of type but he had as you can see the name of

35
00:02:17,370 --> 00:02:19,040
this object is Bar.

36
00:02:19,490 --> 00:02:24,960
Another object of type rating bar rating bar and he had as you can see I declared an object of type

37
00:02:24,960 --> 00:02:25,890
radio group.

38
00:02:25,890 --> 00:02:26,370
OK.

39
00:02:26,430 --> 00:02:32,790
As you can see here and it actually declared for different objects of type radio about local radio about

40
00:02:32,870 --> 00:02:35,860
one radio button to add radio button free.

41
00:02:35,910 --> 00:02:41,950
So now inside of this uncreate Meffert I want to actually instantiate these objects that they actually

42
00:02:41,950 --> 00:02:44,660
are declared inside this main activity class.

43
00:02:44,700 --> 00:02:45,090
OK.

44
00:02:45,120 --> 00:02:49,920
So inside this uncreate Smurfette I'm going to actually pasting some lines of code here and then I'm

45
00:02:49,920 --> 00:02:51,770
going to explain to you what's going on here.

46
00:02:51,780 --> 00:02:52,260
OK.

47
00:02:52,440 --> 00:02:55,850
So as you can see here these are the lines of code that they actually paste that here.

48
00:02:56,010 --> 00:02:57,860
And you can see these values here.

49
00:02:58,020 --> 00:03:01,810
And as you can see first of all I actually instantiated this checkbooks object.

50
00:03:01,830 --> 00:03:05,420
And here I actually cast that this object to a checkbox object.

51
00:03:05,490 --> 00:03:08,330
And here I refer to this ID checkbooks number one.

52
00:03:08,520 --> 00:03:14,520
And again I did the same thing with this check box too and I tested this object to a checkbox checkbooks

53
00:03:14,520 --> 00:03:18,560
object and I referred to this checkbox number two.

54
00:03:18,630 --> 00:03:24,210
And here as you can see I instantiated this checkbox number for the checkbox number for the checkbox

55
00:03:24,210 --> 00:03:28,840
number for as you can see here are that the checkbox number for checkbox number 5.

56
00:03:29,100 --> 00:03:36,060
And here I thought Id take box number five checkbox number 6 and checkbooks number 7 and checkbooks

57
00:03:36,060 --> 00:03:36,580
number 8.

58
00:03:36,600 --> 00:03:37,210
OK.

59
00:03:37,380 --> 00:03:42,780
And here I actually instantiate this CBOT object and here as you can see I actually cast that this object

60
00:03:43,080 --> 00:03:44,570
to see what object.

61
00:03:44,580 --> 00:03:46,910
And here are you referring to the IDC report.

62
00:03:47,220 --> 00:03:50,970
And here as you can see I instantiated this rating what object.

63
00:03:50,970 --> 00:03:56,680
And as you can see here I cast this object to R-rating But object and here as you can see the effect

64
00:03:57,260 --> 00:04:03,990
I referred to the ID rating but here as you can see here and here as you can see I actually instantiated

65
00:04:04,040 --> 00:04:07,670
this radio object and hit as you can see it's showing us and at it.

66
00:04:07,680 --> 00:04:08,130
OK.

67
00:04:08,250 --> 00:04:12,840
So let's actually hold that our mouse pointer over the area and see what's the error.

68
00:04:13,050 --> 00:04:15,600
As you can see it's just cannot resile symbol.

69
00:04:15,630 --> 00:04:16,550
Radio Group.

70
00:04:16,560 --> 00:04:18,920
So we don't have any ID card.

71
00:04:18,920 --> 00:04:23,740
Actually the radio group that is actually assigned to this radio group object OK.

72
00:04:23,880 --> 00:04:28,740
So here I can actually go in and say this content underline minute example and here as you can see in

73
00:04:28,740 --> 00:04:31,340
say this componentry section we have this lady here.

74
00:04:31,350 --> 00:04:37,830
OK so now let's actually find the attributes of this radio group as you can see this I.D. doesn't have

75
00:04:37,890 --> 00:04:39,340
a default value.

76
00:04:39,370 --> 00:04:44,800
OK so here I need to actually assign a value for this radio group object.

77
00:04:44,910 --> 00:04:53,430
So I can just type in radio group as an ID OK group and then our press Enter key on your keyboard.

78
00:04:53,430 --> 00:04:56,970
So let's ask you to go back and say this main activity that double fight and now as you can see the

79
00:04:56,970 --> 00:04:58,220
error is gone.

80
00:04:58,530 --> 00:04:58,800
OK.

81
00:04:58,800 --> 00:05:04,900
As you can see here we are instantiating these arrays you abandoned objects as you can see I am actually

82
00:05:04,900 --> 00:05:11,190
casting this object to write you about it and find if by id artist Id dot radio button one.

83
00:05:11,230 --> 00:05:11,510
OK.

84
00:05:11,530 --> 00:05:15,220
And here as you can see radio button to lead you about in free.

85
00:05:15,310 --> 00:05:15,790
OK.

86
00:05:15,790 --> 00:05:21,010
So now I want to actually make these checkboxes as you can see here.

87
00:05:21,140 --> 00:05:26,900
I want to make this a checkbox says a listener to the clicks that the user made on these checkboxes

88
00:05:26,990 --> 00:05:27,180
here.

89
00:05:27,190 --> 00:05:27,850
OK.

90
00:05:28,000 --> 00:05:31,100
So you want to do some think of it these checkboxes.

91
00:05:31,120 --> 00:05:31,600
OK.

92
00:05:31,660 --> 00:05:34,770
And then I want to make them a listener to the clicks of the user.

93
00:05:34,780 --> 00:05:35,320
OK.

94
00:05:35,320 --> 00:05:39,460
So in order to do that OK I'm going to actually paste in some lines of code here and then I'm going

95
00:05:39,460 --> 00:05:41,570
to explain to you what's going on here.

96
00:05:41,590 --> 00:05:44,930
So as you can see here these are the lines of code that they actually pasted here.

97
00:05:44,980 --> 00:05:50,380
And as you can see here I am actually making each of these eight checkboxes a listener or to the police

98
00:05:50,380 --> 00:05:50,850
of the user.

99
00:05:50,850 --> 00:05:51,300
OK.

100
00:05:51,310 --> 00:05:57,820
So in order to do that you need to actually call this set on checked change a listener on this or checkbox

101
00:05:57,820 --> 00:05:58,120
object.

102
00:05:58,130 --> 00:05:58,680
OK.

103
00:05:58,750 --> 00:06:04,630
And as you can see here we actually call this if it's set on check to change the center on each of these

104
00:06:04,810 --> 00:06:11,350
checkbox objects and inside the apprentice's as you can see if you need to actually specify the context.

105
00:06:11,350 --> 00:06:14,320
OK so the context is the class main activity that this.

106
00:06:14,350 --> 00:06:14,890
OK.

107
00:06:15,070 --> 00:06:21,220
So in order to actually make these checkboxes or listen to the clicks of the user you need to actually

108
00:06:21,220 --> 00:06:22,650
implement an interface.

109
00:06:22,660 --> 00:06:23,840
Here in our class.

110
00:06:23,920 --> 00:06:26,200
So here I can just type in implements.

111
00:06:26,580 --> 00:06:32,070
Compound compound BOTTEN OK.

112
00:06:32,230 --> 00:06:35,370
Compound button dot on checked.

113
00:06:35,380 --> 00:06:36,590
Change listener.

114
00:06:36,760 --> 00:06:37,270
OK.

115
00:06:37,450 --> 00:06:43,990
So as you can see he had to actually implement this interface in order to actually make these checkboxes

116
00:06:44,010 --> 00:06:45,980
or listening to the police of the user.

117
00:06:46,090 --> 00:06:51,370
And if I actually hovered over this area and as you can see it says classman activity must either be

118
00:06:51,370 --> 00:06:57,400
declared abstract or implement abstract method and take the change as you can see here this method.

119
00:06:57,400 --> 00:07:01,030
So now let's actually implement that method in our class.

120
00:07:01,030 --> 00:07:08,950
So here I can just like click locally in inside our class and then click on generate and here you can

121
00:07:08,950 --> 00:07:12,040
actually click on implement methods.

122
00:07:12,340 --> 00:07:16,080
So as you can see here this is the method that you need to actually implement in our class as he had

123
00:07:16,090 --> 00:07:21,490
said he had it says Android that visit that compound button that unchecked the change to the Senate.

124
00:07:21,490 --> 00:07:21,930
OK.

125
00:07:21,940 --> 00:07:23,920
So it is interface as you can see.

126
00:07:23,920 --> 00:07:28,990
You can see this letter inside this little green circle here.

127
00:07:29,050 --> 00:07:29,490
OK.

128
00:07:29,620 --> 00:07:32,380
And this is the method that is inside of this interface.

129
00:07:32,490 --> 00:07:33,880
Ok unchecked change.

130
00:07:33,880 --> 00:07:35,890
So here I just need to click on OK.

131
00:07:36,130 --> 00:07:40,330
And as you can see here this is the method that you need to actually implement and you need to actually

132
00:07:40,330 --> 00:07:43,580
overwrite this method here inside your class.

133
00:07:43,960 --> 00:07:49,780
So now our inside of the Smurfette I'm going actually are pasting some lines of code and then I'm going

134
00:07:49,780 --> 00:07:52,290
to explain to you what's going on here.

135
00:07:52,300 --> 00:07:57,050
So as you can see here I actually pasted this sweetest statement inside this method.

136
00:07:57,070 --> 00:07:57,500
OK.

137
00:07:57,610 --> 00:08:02,090
And now we can actually explain to you what what does this switch statement do here.

138
00:08:02,110 --> 00:08:02,790
OK.

139
00:08:03,280 --> 00:08:07,540
So now as you can see I created a switch statement inside the Smurfit unchecked to change.

140
00:08:07,660 --> 00:08:10,320
And this MF it actually accepts two arguments.

141
00:08:10,450 --> 00:08:16,160
The first one is button view and the actually the type of this button is compound button and then the

142
00:08:16,240 --> 00:08:21,410
next one is is checked and the type of this argument is Boullion.

143
00:08:21,490 --> 00:08:27,190
And remember that here we are actually implementing compound button that Antek change the center because

144
00:08:27,790 --> 00:08:32,580
we can actually check our multiple checkboxes in our layout.

145
00:08:32,590 --> 00:08:39,310
As you can see here this is because of this feature we are actually implementing the compound button

146
00:08:39,580 --> 00:08:45,550
that took changelessness because because we can actually to change change the value of multiple checkboxes

147
00:08:45,820 --> 00:08:46,900
in our program.

148
00:08:46,900 --> 00:08:47,520
OK.

149
00:08:47,830 --> 00:08:51,880
So as you can see here insight is unchecked to change Meffert.

150
00:08:51,970 --> 00:08:58,490
Here if you have an argument of type compound button and the name of this argument is bartend view.

151
00:08:58,630 --> 00:09:01,460
And we have this is checked boolean argument here.

152
00:09:01,480 --> 00:09:02,200
OK.

153
00:09:02,200 --> 00:09:04,600
And we have this switch statement here.

154
00:09:04,780 --> 00:09:05,380
OK.

155
00:09:05,620 --> 00:09:13,630
And inside this switch statement as you can see here are actually specified that up button view.

156
00:09:13,750 --> 00:09:14,230
OK.

157
00:09:14,230 --> 00:09:18,020
So here we need to actually differentiate between each of these checkboxes.

158
00:09:18,040 --> 00:09:18,610
OK.

159
00:09:18,610 --> 00:09:23,470
So if you need to actually know which one of these checkboxes the use that actually checked.

160
00:09:23,500 --> 00:09:23,940
OK.

161
00:09:24,130 --> 00:09:28,360
So in order to know that first of all we need to actually have this spot in view.

162
00:09:28,360 --> 00:09:29,010
OK.

163
00:09:29,020 --> 00:09:34,810
So these are all but interviews with all of these checkboxes as you can see here are each of these are

164
00:09:34,810 --> 00:09:36,800
actually all of these are button views.

165
00:09:36,820 --> 00:09:37,250
OK.

166
00:09:37,360 --> 00:09:40,250
So here we have both in view dot gets ID.

167
00:09:40,390 --> 00:09:40,930
OK.

168
00:09:40,930 --> 00:09:47,230
So by actually getting the ID of these components in our screen we can actually specify that of which

169
00:09:47,230 --> 00:09:50,580
one of these checkboxes they use that actually checked.

170
00:09:50,620 --> 00:09:51,080
OK.

171
00:09:51,250 --> 00:09:57,560
So button in that get ID Chase are thought Id the checkbox number one.

172
00:09:57,610 --> 00:09:58,120
OK.

173
00:09:58,360 --> 00:10:03,350
So if you have a checkbox an I.D. that is actually its name is check box number one.

174
00:10:03,360 --> 00:10:05,050
So this one is checkbooks number one.

175
00:10:05,100 --> 00:10:05,710
OK.

176
00:10:06,000 --> 00:10:12,990
So if the checkbox is a checkbox number of one then if that that actually checked it just checked this

177
00:10:13,140 --> 00:10:17,420
checkbox number of one then we have an if statement here it is checked.

178
00:10:17,430 --> 00:10:17,840
OK.

179
00:10:17,940 --> 00:10:23,940
So if the value of this check box is actually checked so that's because so that's why you have these

180
00:10:24,510 --> 00:10:26,290
Boullion argument here.

181
00:10:26,400 --> 00:10:27,390
Bulliet is checked.

182
00:10:27,420 --> 00:10:32,160
So this argument actually allows us to find out whether the checkbox is checked or not.

183
00:10:32,190 --> 00:10:32,670
OK.

184
00:10:32,820 --> 00:10:38,700
So if the value of this is checked a boolean value but is true then it's going to execute this line

185
00:10:38,700 --> 00:10:41,040
of code instead of the curly braces of this statement.

186
00:10:41,130 --> 00:10:46,700
Here I can just type in boxing is checked OK.

187
00:10:46,830 --> 00:10:50,700
And here as you can see the first argument is the context.

188
00:10:50,730 --> 00:10:54,870
This next one is actually for actually showing the text to the user.

189
00:10:54,900 --> 00:10:59,580
And here we are actually specifying the duration of the text that we are that we want to actually show

190
00:10:59,580 --> 00:11:00,280
to the user.

191
00:11:00,420 --> 00:11:06,030
And here we need to actually call the show effect on this object on this toast object in order to actually

192
00:11:06,540 --> 00:11:08,440
to actually show this object to the user.

193
00:11:08,460 --> 00:11:10,130
OK it is toast object.

194
00:11:10,130 --> 00:11:14,480
And now as you can see let's actually see the other values here.

195
00:11:14,550 --> 00:11:16,980
So as you can see here we put this break statement.

196
00:11:16,980 --> 00:11:19,530
So it's going to actually break out of this break.

197
00:11:19,620 --> 00:11:20,510
A switch statement.

