1
00:00:00,420 --> 00:00:06,000
There's actually a comment out this if else statement here because I want to show you another way in

2
00:00:06,000 --> 00:00:08,900
order to write this line of code here.

3
00:00:08,900 --> 00:00:09,740
These lines of code

4
00:00:15,520 --> 00:00:21,870
so I can just type in C H x true and true yes that said check it.

5
00:00:21,910 --> 00:00:28,390
And here I can actually put in a boolean expression here so I can just put in a pair a pair of round

6
00:00:28,390 --> 00:00:34,980
brackets here and then I can just refer to the name of this true and true valuable true and true.

7
00:00:35,230 --> 00:00:36,080
OK.

8
00:00:36,610 --> 00:00:37,980
Question mark.

9
00:00:38,320 --> 00:00:39,820
True.

10
00:00:40,580 --> 00:00:42,680
Otherwise for us.

11
00:00:43,400 --> 00:00:43,950
OK.

12
00:00:43,990 --> 00:00:51,530
And this means if the value of this true and true valuable is true then X then assigned the value true

13
00:00:51,830 --> 00:00:52,740
to the Smurfette.

14
00:00:52,750 --> 00:00:58,860
This said checked my faith and otherwise if the value of this true and true variable is not true.

15
00:00:58,870 --> 00:01:04,040
So it is false then assign the value false to this strict method.

16
00:01:04,270 --> 00:01:11,170
OK so now let's actually create another line of Cahir see X true and true.

17
00:01:11,170 --> 00:01:14,760
Now that said check it.

18
00:01:14,920 --> 00:01:22,240
And here again I need to put in a pair of round brackets here and now I need to put in an exclamation

19
00:01:22,240 --> 00:01:22,950
mark here.

20
00:01:22,960 --> 00:01:31,880
True and true questionmark true otherwise false.

21
00:01:31,900 --> 00:01:38,180
So here I am specifying that if the value of this true and true value but is not true.

22
00:01:38,260 --> 00:01:39,070
So it is false.

23
00:01:39,070 --> 00:01:46,180
OK if the value of is true and true variable is false then assign the value true to the said checked

24
00:01:46,180 --> 00:01:51,690
Meffert that is related to this see X true and true no object.

25
00:01:52,070 --> 00:01:57,480
And otherwise if the value of this true and true value is actually true.

26
00:01:57,550 --> 00:02:03,420
So as you can see here first we have specified that if the value of this true and true variable is false.

27
00:02:03,430 --> 00:02:03,690
OK.

28
00:02:03,690 --> 00:02:10,630
By putting this exclamation mark we specified that if the value of this true and true value but is false

29
00:02:10,930 --> 00:02:13,830
then assign the value true to this said Chicot method.

30
00:02:14,080 --> 00:02:20,500
Otherwise And that means if the value of these true and true variable is true then assign the value

31
00:02:20,500 --> 00:02:21,780
false to this.

32
00:02:21,790 --> 00:02:22,580
So check the method.

33
00:02:22,600 --> 00:02:23,250
OK.

34
00:02:23,800 --> 00:02:29,910
So if this may sound confusing to you you may want to actually use this if else statements in your code.

35
00:02:29,950 --> 00:02:35,890
And don't worry about our using this way of writing your own code because now you want to actually show

36
00:02:35,890 --> 00:02:39,220
you how you can actually write these expressions.

37
00:02:39,220 --> 00:02:44,660
OK it doesn't really matter whether you try to write IF statements or write your code in this way.

38
00:02:44,790 --> 00:02:45,260
OK.

39
00:02:45,310 --> 00:02:46,660
So hopefully that makes sense.

40
00:02:46,690 --> 00:02:50,780
So as you can see here let's actually run our project and see what happens.

41
00:02:50,970 --> 00:02:51,560
OK.

42
00:02:51,610 --> 00:02:54,840
As you can see here it's now showing us the same results.

43
00:02:54,990 --> 00:02:55,260
OK.

44
00:02:55,270 --> 00:02:58,320
Now as you can see the value of this.

45
00:02:58,690 --> 00:03:01,170
Yes checkbox is actually on.

46
00:03:01,290 --> 00:03:03,690
OK the value of this box is true.

47
00:03:04,000 --> 00:03:04,420
OK.

48
00:03:04,480 --> 00:03:07,390
So this line of code is actually get executed here.

49
00:03:07,650 --> 00:03:08,320
OK.

50
00:03:08,710 --> 00:03:10,490
So hopefully that makes sense.

51
00:03:10,540 --> 00:03:16,750
And let's actually go back inside this content underline line that example and then let's actually dragging

52
00:03:16,990 --> 00:03:21,800
a linearly out horizontal into this linearly Ellsworthy call.

53
00:03:21,970 --> 00:03:24,840
So just click on this linearly or horizontal.

54
00:03:25,270 --> 00:03:31,540
You can actually put it inside this linearly alphabetical order you can actually click on this linearly

55
00:03:31,540 --> 00:03:32,840
output as you call here.

56
00:03:33,230 --> 00:03:33,870
OK.

57
00:03:34,090 --> 00:03:40,950
And then let's actually dragging a a large text view into this linear layout horizontal here.

58
00:03:41,170 --> 00:03:48,020
So just put it inside this linearly and horizontal and then double click and this takes through here.

59
00:03:48,040 --> 00:03:49,780
So for the text just typing here.

60
00:03:49,780 --> 00:03:52,930
True and False.

61
00:03:53,360 --> 00:03:54,100
OK.

62
00:03:54,130 --> 00:04:04,630
And for the ID just typing and for the ID just type in here t x the true and false.

63
00:04:05,050 --> 00:04:05,900
OK.

64
00:04:06,580 --> 00:04:15,360
And here are just press Enter key on your keyboard and then let's actually put tracking two more checkboxes

65
00:04:15,420 --> 00:04:16,030
here inside.

66
00:04:16,210 --> 00:04:23,400
These are linearly out horizontal and by the way we don't need to actually assign an ID to.

67
00:04:23,440 --> 00:04:28,960
These are text views because I don't because we don't want to actually interact with these are text

68
00:04:28,960 --> 00:04:31,210
we use from our Java codes.

69
00:04:31,390 --> 00:04:38,230
But here I just wanted to show you that you can actually assign IDs to your text views in order to interact

70
00:04:38,230 --> 00:04:38,710
with them.

71
00:04:38,740 --> 00:04:43,420
But for this project we don't need to assign an ID to these text use here.

72
00:04:43,420 --> 00:04:43,920
OK.

73
00:04:44,050 --> 00:04:47,990
We just need to assign an ID to these checkboxes here.

74
00:04:48,040 --> 00:04:52,900
So let's actually try again two more checkboxes into this linear layout horizontal.

75
00:04:53,050 --> 00:05:00,100
So just click on the checkbox and then put it inside this linearly out horizontal here and then double

76
00:05:00,100 --> 00:05:04,250
click on this checkbox and for the text just type in here yes.

77
00:05:04,270 --> 00:05:10,510
And for the ID just type in here c h x true and false.

78
00:05:10,900 --> 00:05:11,490
Yes.

79
00:05:11,620 --> 00:05:17,110
And let's actually try again another checkbox into this linearly and horizontal.

80
00:05:17,130 --> 00:05:23,340
So just click on the checkbox here and then put it up beside these are checkbox here and then double

81
00:05:23,340 --> 00:05:24,910
click on this checkbox here.

82
00:05:24,930 --> 00:05:27,240
So for the text just type in here no.

83
00:05:27,270 --> 00:05:34,850
And for the ID just type in here see X true and false no.

84
00:05:35,610 --> 00:05:38,270
And then click on this linearly and horizontal.

85
00:05:38,340 --> 00:05:44,670
And let's actually find the gravity attributes and then check this check box here that says Center underline

86
00:05:44,670 --> 00:05:50,750
horizontal as you can see it's going to actually center the components that are inside of this linearly

87
00:05:50,750 --> 00:05:52,530
out horizontally.

88
00:05:52,590 --> 00:05:53,970
Hopefully that makes sense.

89
00:05:54,300 --> 00:05:59,820
And let's actually go back and say this main activity that you have a file here and then let's actually

90
00:06:00,600 --> 00:06:02,830
create some more objects here.

91
00:06:02,970 --> 00:06:11,050
So here let's actually create a comment here so I can just type in true and false.

92
00:06:11,520 --> 00:06:18,600
Ok so I can just create an object from this text object takes your class and then for the name again

93
00:06:18,600 --> 00:06:28,320
just type in t the true and false and then I need to cast this object to a test object find view by

94
00:06:28,320 --> 00:06:33,990
id r that Id Dot T T true and false.

95
00:06:34,380 --> 00:06:35,240
OK.

96
00:06:35,880 --> 00:06:43,350
And again we don't need to create an object from this test class for this project but of here I just

97
00:06:43,350 --> 00:06:49,500
wanted to show you that you can actually create an object from this class and then relate that this

98
00:06:49,500 --> 00:06:51,200
object to that component.

99
00:06:51,330 --> 00:06:53,700
Inside this screen and interact with it.

100
00:06:53,700 --> 00:06:54,330
OK.

101
00:06:54,690 --> 00:07:01,670
So we need to actually create a checkbox class C X X true and false.

102
00:07:02,100 --> 00:07:03,260
Yes.

103
00:07:03,440 --> 00:07:10,500
Assignment operator and then and then we need to actually cast this object to a checkbox object find

104
00:07:11,010 --> 00:07:18,020
view by id r that Id dot c h x true and false.

105
00:07:18,270 --> 00:07:18,810
Yes.

106
00:07:18,960 --> 00:07:27,600
Again we need to actually create a checkbox class C H x true and false no.

107
00:07:28,080 --> 00:07:33,240
And then I mean to put in an assignment operator here and then we need to actually cast this object

108
00:07:33,240 --> 00:07:34,540
to a checkbox object.

109
00:07:34,600 --> 00:07:36,170
OK fine.

110
00:07:36,290 --> 00:07:45,330
If you by id art that Id dot c c h x true and false.

111
00:07:45,330 --> 00:07:46,380
No.

112
00:07:47,070 --> 00:07:47,730
OK.

113
00:07:48,150 --> 00:07:50,840
So let's actually interact with these objects.

114
00:07:50,880 --> 00:07:58,140
So here let's actually create a comment true and false.

115
00:07:58,140 --> 00:08:06,140
So let's actually create a boolean variable boolean and the name of our variable is true and false.

116
00:08:06,390 --> 00:08:08,900
And then we need to put in an assignment operator here.

117
00:08:08,910 --> 00:08:12,760
So let's actually assign a boolean expression to this variable.

118
00:08:12,810 --> 00:08:17,890
True and false.

119
00:08:18,540 --> 00:08:23,640
And then it's actually putting a semicolon at the end of our statement and then we can actually create

120
00:08:24,300 --> 00:08:25,470
an if statement here.

121
00:08:25,470 --> 00:08:33,710
If true and false and this means if the value of is true and false value but it is true.

122
00:08:33,930 --> 00:08:41,070
So if the value of this expression evaluates to true that true value is going to be assigned to this

123
00:08:41,070 --> 00:08:48,900
true and false value variable and if the value of this true and false value but is true then execute

124
00:08:48,990 --> 00:08:54,740
this line of code here inside of these curly braces C S X true and false.

125
00:08:54,990 --> 00:08:59,210
Yes that said check it.

126
00:08:59,680 --> 00:09:03,400
True it it's going to actually check this checkbox here.

127
00:09:03,410 --> 00:09:06,070
As you can see it's going to take this a yes checkbox.

128
00:09:06,110 --> 00:09:18,050
If the value of this true and false that valuable is true OK and if and else if the value of this true

129
00:09:18,080 --> 00:09:20,450
and false value bet is false.

130
00:09:20,450 --> 00:09:22,040
So exclamation mark.

131
00:09:22,040 --> 00:09:26,460
True and False.

132
00:09:26,510 --> 00:09:29,970
Then execute this line of code here inside of this curly braces.

133
00:09:29,990 --> 00:09:32,860
See it's true and false.

134
00:09:33,080 --> 00:09:39,570
No that said checked.

135
00:09:39,780 --> 00:09:42,370
OK so hopefully that makes sense.

136
00:09:42,740 --> 00:09:45,590
And let's actually run our project and see what happens.

