1
00:00:00,920 --> 00:00:10,490
So as you can see here I made this up object this checkbox here a listener to the clicks that the user

2
00:00:10,490 --> 00:00:10,940
make.

3
00:00:11,090 --> 00:00:17,000
So whenever that they actually click on the checkbox a dismembered is going to be called said unclick

4
00:00:17,030 --> 00:00:17,700
listener.

5
00:00:17,720 --> 00:00:18,190
OK.

6
00:00:18,380 --> 00:00:23,200
So inside of this on Comerford I can just put in my own quotes.

7
00:00:23,210 --> 00:00:26,730
So first of all I want to actually create an if statement.

8
00:00:26,960 --> 00:00:31,540
And inside Apprentice's I can just typing C is X..

9
00:00:31,580 --> 00:00:35,250
Healthy Yes that is checked.

10
00:00:35,300 --> 00:00:40,420
So now I need to actually open and close this statement by using these curly braces.

11
00:00:40,460 --> 00:00:42,060
So now what's going on.

12
00:00:42,410 --> 00:00:45,910
As you can see here first of all I created an if statement.

13
00:00:45,950 --> 00:00:46,600
OK.

14
00:00:46,910 --> 00:00:54,380
And inside Apprentice's of this if statement I specified a condition first I actually referred to the

15
00:00:54,380 --> 00:00:59,380
name of this see as healthy as object as you can see here.

16
00:00:59,500 --> 00:00:59,950
OK.

17
00:01:00,000 --> 00:01:05,940
So and then I actually called this is checked my effect on this object.

18
00:01:05,990 --> 00:01:09,670
So this method actually returns a boolean value.

19
00:01:09,900 --> 00:01:11,540
OK true or false.

20
00:01:11,540 --> 00:01:15,840
So as you can see here when I actually check this checkbox here.

21
00:01:15,980 --> 00:01:20,800
Now as you can see the value of this checkbox is true.

22
00:01:21,100 --> 00:01:21,690
OK.

23
00:01:21,890 --> 00:01:26,790
And when I actually check of this checkbox the value of this checkbox is false.

24
00:01:26,900 --> 00:01:27,410
OK.

25
00:01:27,680 --> 00:01:29,410
So that's the job of this method.

26
00:01:29,600 --> 00:01:33,540
Well I actually called this is checked method on does see it.

27
00:01:33,590 --> 00:01:35,710
Healthy Yes object.

28
00:01:35,810 --> 00:01:38,950
I am actually specifying the value of this checkbox.

29
00:01:38,990 --> 00:01:39,450
OK.

30
00:01:39,590 --> 00:01:45,510
So if I actually check this checkbox and if I actually if the value of the checkbox is on.

31
00:01:45,680 --> 00:01:48,720
Now this method actually returns the value true.

32
00:01:48,740 --> 00:01:52,190
But if you actually check off this check check box.

33
00:01:52,190 --> 00:01:55,970
Now this method actually returns the value for this.

34
00:01:55,970 --> 00:01:58,910
OK because I actually checked of this checkbox.

35
00:01:58,910 --> 00:01:59,440
OK.

36
00:01:59,540 --> 00:02:02,360
So this method actually returns a boolean value.

37
00:02:02,360 --> 00:02:03,430
True or false.

38
00:02:03,590 --> 00:02:09,820
And that value is actually determined by actually check checking on or checking of the check box.

39
00:02:09,920 --> 00:02:10,610
OK.

40
00:02:11,090 --> 00:02:19,590
So here I am actually specifying that if they return the value of this checkbox is true if the check

41
00:02:19,590 --> 00:02:24,000
box is on OK or if the value of this checkbox is true.

42
00:02:24,320 --> 00:02:31,830
Now I can actually put in my own codes inside of this statement see X healthy no.

43
00:02:32,030 --> 00:02:38,240
So now I am actually fairly end to the name of this object see as healthy no object to that to the name

44
00:02:38,240 --> 00:02:40,260
of this check box here OK.

45
00:02:40,360 --> 00:02:46,920
C S S Helfen no doubt set checked Fahd's.

46
00:02:47,040 --> 00:02:50,140
OK so when I actually check this checkbox.

47
00:02:50,150 --> 00:02:56,900
So if the value of this checkbox is true the value of this checkbox must be false.

48
00:02:57,030 --> 00:02:57,550
OK.

49
00:02:57,630 --> 00:03:00,890
So that's why I actually created this statement here.

50
00:03:01,530 --> 00:03:02,140
Here I am.

51
00:03:02,190 --> 00:03:08,700
I am actually specifying that if the value of this checkbox is true the value of the tick box must be

52
00:03:08,700 --> 00:03:09,410
false.

53
00:03:09,650 --> 00:03:10,210
OK.

54
00:03:10,320 --> 00:03:17,370
So for example imagine that I actually checked this checkbox here and now as you can see I created a

55
00:03:17,370 --> 00:03:20,910
set unclick listener for this see as a healthy Yes object.

56
00:03:20,910 --> 00:03:21,330
OK.

57
00:03:21,420 --> 00:03:25,500
So now as you can see the value of this checkbox is true.

58
00:03:25,650 --> 00:03:26,120
OK.

59
00:03:26,250 --> 00:03:28,310
I actually checked this checkbox.

60
00:03:28,510 --> 00:03:33,220
And now if I actually check this checkbox as you can see the value of this.

61
00:03:33,240 --> 00:03:39,030
And now if we actually take this checkbox the value of these checkbooks must be false.

62
00:03:39,030 --> 00:03:42,280
So let's actually run our project and test this code.

63
00:03:42,300 --> 00:03:42,850
OK.

64
00:03:42,930 --> 00:03:43,380
OK.

65
00:03:43,470 --> 00:03:47,670
As you can see now our application is actually running on this emulator.

66
00:03:48,000 --> 00:03:50,840
So here let's actually check this checkbox here.

67
00:03:51,060 --> 00:03:58,190
As you can see let's check this checkbox and here as you can see I actually made this checkbox a listener

68
00:03:58,680 --> 00:04:00,980
to the clique's that the user make.

69
00:04:01,200 --> 00:04:01,500
OK.

70
00:04:01,500 --> 00:04:02,930
And inside is unclear.

71
00:04:02,980 --> 00:04:08,790
Mefford I actually created an if statement and then I actually referred to the name of this checkbox

72
00:04:08,910 --> 00:04:10,000
and then I called.

73
00:04:10,020 --> 00:04:13,500
This is checked Meffert on this object.

74
00:04:13,500 --> 00:04:15,970
And this if it returns a boolean value.

75
00:04:16,020 --> 00:04:17,110
True or false.

76
00:04:17,250 --> 00:04:24,630
If this if the value of this checkbox is true that this returns the value true and if this and if the

77
00:04:24,630 --> 00:04:29,750
value of this checkbox is false this method actually returns the value of once.

78
00:04:30,000 --> 00:04:37,410
And here I am telling that if the value of this checkbox is true if you actually click on this or checkbox

79
00:04:37,890 --> 00:04:43,800
and this checkbox returns the value true to me and then I can actually execute this line of code here

80
00:04:44,090 --> 00:04:47,250
C-h X Helfen know that said check it for us.

81
00:04:47,250 --> 00:04:51,230
So this means this means that this checkbox is going to be checked off.

82
00:04:51,540 --> 00:04:52,030
OK.

83
00:04:52,170 --> 00:04:54,510
So let's actually check this check box here.

84
00:04:54,510 --> 00:04:58,810
As you can see now this check box is actually checked off.

85
00:04:59,070 --> 00:04:59,680
OK.

86
00:04:59,910 --> 00:05:01,440
So hopefully that makes sense.

87
00:05:01,440 --> 00:05:06,740
So now let's actually make this checkbox a listener to the clicks that they use and make.

88
00:05:06,760 --> 00:05:09,630
Because now if we actually click on the check box here.

89
00:05:09,630 --> 00:05:12,710
Now as you can see if these two take box are checked on.

90
00:05:13,020 --> 00:05:16,520
So let's actually create a set and click listener for this checkbox.

91
00:05:16,530 --> 00:05:18,140
And here after this after this.

92
00:05:18,150 --> 00:05:20,040
So then click listen for this.

93
00:05:20,040 --> 00:05:26,400
See as a whole for Yes I can actually refer to the name of the C as x Helfen no object data said unclick

94
00:05:26,480 --> 00:05:31,280
listener new view that unclick listener.

95
00:05:31,440 --> 00:05:36,520
Now as you can see inside this unclick my friend I can actually put my Ancoats.

96
00:05:36,570 --> 00:05:46,890
So if H x Helfen no dot dot is checked inside the curly braces.

97
00:05:46,890 --> 00:05:54,650
I can put my Ancoats see x x healthy Yes that said checked Fahd's.

98
00:05:55,370 --> 00:05:55,830
OK.

99
00:05:55,950 --> 00:06:00,750
Again I am actually making this object this checkbox.

100
00:06:00,750 --> 00:06:03,560
Or listening to the clicks that the user make.

101
00:06:03,900 --> 00:06:06,550
And then I am inside this unclick my faith.

102
00:06:06,570 --> 00:06:08,540
I created an if statement.

103
00:06:08,700 --> 00:06:14,130
And here I am telling the computer that if the value of this checkbox is true if the returned value

104
00:06:14,370 --> 00:06:22,620
of the second box is true or if this checkbox is on and an inside the curly braces Please execute this

105
00:06:22,620 --> 00:06:23,580
line of code here.

106
00:06:23,660 --> 00:06:24,940
S.H. exhale for years.

107
00:06:24,960 --> 00:06:28,430
So this object must be checked off OK.

108
00:06:28,530 --> 00:06:34,470
The value of this check checkbox must be off ok must be false.

109
00:06:34,470 --> 00:06:37,400
So let's actually run our project and test our code.

110
00:06:37,500 --> 00:06:38,070
OK.

111
00:06:38,070 --> 00:06:43,810
As you can see now our application is actually running on this emulator here and here.

112
00:06:43,920 --> 00:06:46,430
If you actually check this check box here.

113
00:06:46,470 --> 00:06:49,780
Now as you can see the value of this checkbox is true.

114
00:06:49,950 --> 00:06:50,780
OK.

115
00:06:51,030 --> 00:06:54,710
And if I actually check this checkbox Let's see what happens.

116
00:06:54,750 --> 00:07:02,070
Now as you can see the value of the check box is true and the value of this checkbox checkbox is false.

117
00:07:02,070 --> 00:07:04,350
Let's actually check this check box again.

118
00:07:04,380 --> 00:07:11,310
Now the value of this checkbox is true and the value of box is false.

119
00:07:11,370 --> 00:07:12,820
So hopefully that makes sense.

120
00:07:12,900 --> 00:07:16,380
And let's go back inside this main activity that you have a fight here.

121
00:07:16,440 --> 00:07:18,390
And inside this uncreate Smurfette that is.

122
00:07:18,420 --> 00:07:21,360
Let's actually continue adding some more quotes.

123
00:07:21,360 --> 00:07:26,570
OK now let's actually create a pulley and valuable bullion.

124
00:07:26,760 --> 00:07:27,740
Am I healthy.

125
00:07:29,480 --> 00:07:30,020
OK.

126
00:07:30,230 --> 00:07:36,170
And then I put an assignment operator here and then I can actually assign a value to this variable for

127
00:07:36,170 --> 00:07:37,140
example follows.

128
00:07:37,190 --> 00:07:42,520
Ok so now let's actually create an if statement here.

129
00:07:42,710 --> 00:07:43,190
OK.

130
00:07:43,340 --> 00:07:48,140
So if and then inside Apprentice's I can specify a condition.

131
00:07:48,320 --> 00:07:50,930
So if am I healthy.

132
00:07:51,160 --> 00:07:57,560
OK if am I healthy and then I need to actually open and closed this if statement by using these curly

133
00:07:57,560 --> 00:07:58,320
braces.

134
00:07:58,430 --> 00:08:06,340
So as you can see here inside these are prentices I am actually specifying that if the value of this.

135
00:08:06,560 --> 00:08:12,340
Am I healthy is true then I can actually put my statements inside of this statement.

136
00:08:12,410 --> 00:08:13,490
If the value of this.

137
00:08:13,490 --> 00:08:15,940
Am I healthy boolean value bet is true.

138
00:08:16,010 --> 00:08:20,810
So now you can see the value of this boolean variable is false.

139
00:08:20,810 --> 00:08:21,370
OK.

140
00:08:21,560 --> 00:08:29,780
And here inside Apprentice's of this statement I am specifying that if the value of this am I healthy

141
00:08:29,870 --> 00:08:37,060
boolean value but is true then please execute the lines of code that are inside of this if statement.

142
00:08:37,070 --> 00:08:44,190
So here I can just type in C is X Hellfires that said check it.

143
00:08:44,210 --> 00:08:45,220
True.

144
00:08:45,930 --> 00:08:49,340
OK so now let's actually do an art project and see what happens.

145
00:08:49,340 --> 00:08:49,900
OK.

146
00:08:49,940 --> 00:08:55,070
As you can see here now our application is actually running on this emulator.

147
00:08:55,370 --> 00:08:58,740
And as you can see here none of these checkboxes are checked.

148
00:08:59,000 --> 00:09:03,680
OK because I specified that if the value of this.

149
00:09:03,670 --> 00:09:10,360
Am I healthy valuable is true then execute these lines of code inside the inside this IIF statement.

150
00:09:10,370 --> 00:09:17,630
OK so remember let me actually tell you an important point about a boolean boolean value ability in

151
00:09:17,630 --> 00:09:18,180
Java.

152
00:09:18,560 --> 00:09:25,130
So here as you can see I just referred to the name of this boolean variable and this means that if the

153
00:09:25,130 --> 00:09:29,010
value of this boolean variable is true then execute these lines of code here.

154
00:09:29,020 --> 00:09:29,300
OK.

155
00:09:29,290 --> 00:09:32,820
Now let's actually create an ELSE IF statement here else.

156
00:09:33,080 --> 00:09:38,190
If the value of these are my help is valuable is not true.

157
00:09:38,510 --> 00:09:46,480
OK so I put this exclamation mark here in order to negate the value of this boolean variable.

158
00:09:46,520 --> 00:09:46,950
OK.

159
00:09:47,120 --> 00:09:49,600
So if the value of this.

160
00:09:49,640 --> 00:09:52,910
Am I healthy valuable is not true then it is false.

161
00:09:52,910 --> 00:09:53,370
OK.

162
00:09:53,450 --> 00:09:55,580
So as a result it is false.

163
00:09:55,630 --> 00:10:00,050
Ok then execute the lines of code inside of these curly braces.

164
00:10:00,100 --> 00:10:01,430
See chicks.

165
00:10:01,860 --> 00:10:02,830
Helfen no.

166
00:10:02,880 --> 00:10:06,490
That said checked true.

167
00:10:07,310 --> 00:10:07,740
OK.

168
00:10:07,770 --> 00:10:11,100
And this means check this check box here.

169
00:10:11,170 --> 00:10:12,610
There's no checkbox.

170
00:10:12,750 --> 00:10:15,420
So let's actually run our project and see what happens.

