1
00:00:00,290 --> 00:00:05,580
Hire river in this theater they are really going to go ahead and create another Android application.

2
00:00:05,610 --> 00:00:09,030
So just click on this start and you Andrex to your project.

3
00:00:09,060 --> 00:00:09,590
OK.

4
00:00:09,630 --> 00:00:16,440
Now for the application name just typing just typing app 8 and here you can actually specify the company

5
00:00:16,440 --> 00:00:23,010
domain package name and project location and then click on next year make sure that you actually choose

6
00:00:23,010 --> 00:00:29,490
the API 16 Android 4.1 gentlemen next Blanche activity next.

7
00:00:30,030 --> 00:00:32,370
And here don't change any finish.

8
00:00:32,400 --> 00:00:33,640
And then we can finish.

9
00:00:33,750 --> 00:00:36,130
OK everyone now just delete this.

10
00:00:36,170 --> 00:00:43,140
Hello to text you here and then double click on this arrest folder here lay out and then click on DoubleClick

11
00:00:43,210 --> 00:00:48,720
this activity underline I mean that example and then click on these floating action button here and

12
00:00:48,720 --> 00:00:50,640
then person Enter key on your keyboard.

13
00:00:50,640 --> 00:00:51,560
OK.

14
00:00:51,750 --> 00:00:55,010
So let's go back inside this content underline minute example.

15
00:00:55,380 --> 00:01:00,460
And now I want to actually drag in a linear layout vertical into this screen here.

16
00:01:00,510 --> 00:01:00,980
OK.

17
00:01:01,110 --> 00:01:07,470
So just to it in the center of the screen and then click on a relative lay out and let's actually find

18
00:01:07,500 --> 00:01:15,080
the padding attribute that is actually related to this relatively out and for the odd just putting numbers

19
00:01:15,080 --> 00:01:16,410
0 here.

20
00:01:17,100 --> 00:01:24,060
And as you can see now this linearly outwards the court is actually covering the entire screen OK the

21
00:01:24,060 --> 00:01:27,090
entire width and the entire height of the screen.

22
00:01:27,090 --> 00:01:27,480
OK.

23
00:01:27,510 --> 00:01:34,970
So now I want to actually dragging a linearly out horizontal into this linear out vertical.

24
00:01:35,430 --> 00:01:35,950
OK.

25
00:01:36,060 --> 00:01:36,600
OK.

26
00:01:36,600 --> 00:01:43,050
Now as you can see in this component 3 section as you can see here I have a linear layout horizontal

27
00:01:43,350 --> 00:01:45,760
inside this linear layout vertical.

28
00:01:45,760 --> 00:01:52,260
OK so now I want to actually put some components inside this linearly out horizontal.

29
00:01:52,480 --> 00:01:52,940
OK.

30
00:01:53,010 --> 00:01:53,630
OK.

31
00:01:53,640 --> 00:02:01,110
Now in order to actually drag a large text view into this linear layout horizontal I can just click

32
00:02:01,410 --> 00:02:07,820
on this large text view here and then you can just click on this linearly out horizontal here.

33
00:02:07,950 --> 00:02:08,420
OK.

34
00:02:08,490 --> 00:02:09,690
So as you can see here.

35
00:02:09,820 --> 00:02:16,070
Now these are large takes you this takes you actually inside this linearly out horizontal.

36
00:02:16,160 --> 00:02:16,840
OK.

37
00:02:17,070 --> 00:02:23,820
As you can see I can close and open this linearly out horizontal by just clicking on this little triangle

38
00:02:23,820 --> 00:02:24,260
here.

39
00:02:24,360 --> 00:02:24,990
OK.

40
00:02:25,140 --> 00:02:30,070
So this takes view is inside of these a linear layout horizontally.

41
00:02:30,090 --> 00:02:35,730
So now let's actually double click on this a large takes here and a four the text just type in here

42
00:02:35,880 --> 00:02:40,920
and healthy and for the ID are just type in here.

43
00:02:41,000 --> 00:02:42,750
XTi healthy.

44
00:02:42,810 --> 00:02:48,010
So now as you can see here I actually changed the text and the idea of this takes you.

45
00:02:48,390 --> 00:02:53,760
So now I want to actually tracking a checkbox into this linearly out horizontal OK.

46
00:02:53,760 --> 00:03:00,450
So let's actually find the checkbox here as you can see I have this checkbox component here.

47
00:03:00,450 --> 00:03:04,280
So now let's actually select this text box here.

48
00:03:04,620 --> 00:03:09,650
And then you can actually click on these linearly out horizontal.

49
00:03:09,660 --> 00:03:14,000
Or you can actually drag it here into these linearly or horizontal OK.

50
00:03:14,190 --> 00:03:18,590
So I just click on this linearly or horizontally here as you can see here.

51
00:03:18,590 --> 00:03:23,640
Now this checkbox is beside this am I help you text you.

52
00:03:23,730 --> 00:03:30,000
So because this is actually a linear layout and its orientation is horizontal is going to actually put

53
00:03:30,000 --> 00:03:32,360
the components beside each other.

54
00:03:32,640 --> 00:03:34,160
So hopefully that makes sense.

55
00:03:34,230 --> 00:03:40,190
And let's actually click on this checkbox here and for the text just type in here.

56
00:03:40,200 --> 00:03:40,880
Yes.

57
00:03:41,720 --> 00:03:46,040
And for the ID you can actually type in C H X..

58
00:03:46,040 --> 00:03:50,160
This says it stands for checkbox c h X..

59
00:03:50,210 --> 00:03:53,460
Healthy Yes C H x healthy yes.

60
00:03:54,080 --> 00:03:57,890
So now again it's actually dragging another checkbox here.

61
00:03:57,920 --> 00:04:05,790
So just click on this checkbox here and then again put it inside these linearly out horizontal.

62
00:04:05,960 --> 00:04:10,580
So just double click on the checkbox and for the text just type in here no.

63
00:04:10,910 --> 00:04:18,260
And for the ID just type in here see X healthy No.

64
00:04:18,830 --> 00:04:19,970
OK.

65
00:04:20,540 --> 00:04:27,490
So as you can see here I have a linearly or horizontal here and I have a text view here.

66
00:04:27,510 --> 00:04:28,610
Am I healthy.

67
00:04:29,300 --> 00:04:33,390
And I have these yes checkbox and these no checkbox here.

68
00:04:33,410 --> 00:04:33,850
OK.

69
00:04:33,920 --> 00:04:37,820
So let's actually click on this linearly and horizontal here.

70
00:04:38,120 --> 00:04:42,380
And let's actually find that gravity attributes as you can see.

71
00:04:42,380 --> 00:04:44,350
I have to lay out gravity.

72
00:04:44,480 --> 00:04:51,950
Ok this attribute is for the gravity of this linearly of itself and this attribute this gravity attribute

73
00:04:51,950 --> 00:04:57,060
here is actually for the gravity of the tides of this linearly out.

74
00:04:57,170 --> 00:05:01,700
These components are actually the children of this linearly.

75
00:05:01,880 --> 00:05:09,470
OK so now let's actually click on this linearly or horizontally and 4 and just opened this gravity attribute

76
00:05:09,800 --> 00:05:15,890
by actually clicking on this little triangle here and then check this a checkbox here that says Center

77
00:05:15,960 --> 00:05:17,410
underline horizontal.

78
00:05:17,420 --> 00:05:24,920
Now as you can see these components are actually positioned at the center of these linearly out.

79
00:05:24,980 --> 00:05:25,620
OK.

80
00:05:25,700 --> 00:05:27,390
So hopefully that makes sense.

81
00:05:27,410 --> 00:05:32,450
So this gravity attribute is for actually positioning your components inside the screen.

82
00:05:32,470 --> 00:05:39,180
OK so now let's actually go back inside this main activity of our file here and now let's actually delete

83
00:05:39,800 --> 00:05:47,000
these of these lines of code here and again they read these out lines of code that actually are related

84
00:05:47,660 --> 00:05:49,040
to the floating action button.

85
00:05:49,050 --> 00:05:54,060
And now I can actually put my own codes inside of this uncreate Meffert.

86
00:05:54,140 --> 00:05:54,740
OK.

87
00:05:54,740 --> 00:06:02,110
Now let's actually create a text view object here inside this uncreate if it takes to you.

88
00:06:02,540 --> 00:06:06,480
And for the name of this text you object just type in here T.

89
00:06:06,530 --> 00:06:08,520
XTi healthy.

90
00:06:09,280 --> 00:06:09,860
OK.

91
00:06:10,100 --> 00:06:13,190
And then put an assignment operator here.

92
00:06:13,580 --> 00:06:17,930
And now I need to actually cast this object to a text object.

93
00:06:17,930 --> 00:06:18,340
OK.

94
00:06:18,410 --> 00:06:24,250
Find you by I-T or that ID that t XTi healthy.

95
00:06:24,700 --> 00:06:33,580
OK so now let's actually create an object from this checkbox here checkbox class.

96
00:06:33,590 --> 00:06:36,880
So again I can just type in here checkbox.

97
00:06:37,220 --> 00:06:37,950
OK.

98
00:06:38,270 --> 00:06:41,330
So as you can see here I have a class called checkbox.

99
00:06:41,360 --> 00:06:45,720
So let's actually hold the common key and then click on this checkbox here.

100
00:06:45,890 --> 00:06:50,360
If you are using a Windows machine you need to actually hold the control key and then click on this

101
00:06:50,360 --> 00:06:52,010
checkbox OK.

102
00:06:52,310 --> 00:06:59,200
So as you can see here this checkbox class is actually extending this camp it this compound bottom class.

103
00:06:59,210 --> 00:07:06,110
So let's actually hold the command key and let's go inside this compound button and this compound button

104
00:07:06,110 --> 00:07:09,360
is actually extending this button class.

105
00:07:09,620 --> 00:07:10,300
OK.

106
00:07:10,670 --> 00:07:12,850
And this bottom class is actually extending.

107
00:07:12,890 --> 00:07:18,380
This takes your class and this takes three class is extending this view class.

108
00:07:18,440 --> 00:07:19,270
OK.

109
00:07:19,820 --> 00:07:21,420
So hopefully that makes sense.

110
00:07:22,920 --> 00:07:26,900
And let's actually close these classes that are actually opened.

111
00:07:27,200 --> 00:07:28,260
OK.

112
00:07:29,160 --> 00:07:33,780
So inside this main activity that Java as you can see I have a class called checkbooks.

113
00:07:33,780 --> 00:07:34,450
OK.

114
00:07:34,770 --> 00:07:38,160
So for the name of this object I can just type in C x.

115
00:07:38,190 --> 00:07:39,530
Healthy Yes.

116
00:07:40,380 --> 00:07:45,960
And then I put an assignment operator here and then I actually put in a pair of and brackets here in

117
00:07:45,960 --> 00:07:49,600
order to cast this object to a checkbox object.

118
00:07:49,620 --> 00:07:50,810
OK.

119
00:07:50,850 --> 00:07:56,250
Otherwise the compiler may finish that you're actually referring to to an object of type view.

120
00:07:56,560 --> 00:07:57,070
OK.

121
00:07:57,150 --> 00:08:03,930
So checkbox find view by ID or that Id dot see x.

122
00:08:04,200 --> 00:08:06,170
Healthy Yes.

123
00:08:06,870 --> 00:08:12,810
OK so now this object is actually fairly end to this component here.

124
00:08:12,810 --> 00:08:16,320
OK this checkbox that says yes.

125
00:08:16,320 --> 00:08:21,840
So let's actually create another checkbox for this checkbox component here.

126
00:08:21,870 --> 00:08:29,980
So again I can actually refer to the name of this checkbox class checkbox C H x healthy.

127
00:08:30,900 --> 00:08:31,770
No.

128
00:08:32,280 --> 00:08:33,070
OK.

129
00:08:33,090 --> 00:08:38,750
And then I put an assignment operator here and then inside a round brackets again.

130
00:08:38,760 --> 00:08:46,410
I can actually cast this object to the checkbox object and then I can just type in find view by ID or

131
00:08:46,500 --> 00:08:50,040
that Id dot see Edge x no.

132
00:08:50,360 --> 00:08:51,010
OK.

133
00:08:51,210 --> 00:08:52,580
So it's a healthy No.

134
00:08:52,680 --> 00:08:53,340
OK.

135
00:08:53,460 --> 00:08:57,540
And now let's actually run our project and see what happens.

136
00:08:57,740 --> 00:08:58,260
OK.

137
00:08:58,380 --> 00:08:59,010
OK.

138
00:08:59,040 --> 00:09:03,090
Now as you can see our application is actually running on this emulator here.

139
00:09:03,090 --> 00:09:03,560
OK.

140
00:09:03,750 --> 00:09:05,360
And this is our text you.

141
00:09:05,460 --> 00:09:06,440
Am I healthy.

142
00:09:06,750 --> 00:09:08,490
And these are two text boxes here.

143
00:09:08,490 --> 00:09:08,970
OK.

144
00:09:09,120 --> 00:09:11,680
Yes checkbox and no checkbox.

145
00:09:11,720 --> 00:09:17,490
OK so now we want to do something that whenever you are that I actually check one of these checkboxes

146
00:09:17,610 --> 00:09:20,410
the other checkbox be checked off OK.

147
00:09:20,490 --> 00:09:26,090
When I actually checked these are yes checkbox here I cannot check it is a no checkbox here too.

148
00:09:26,250 --> 00:09:26,820
OK.

149
00:09:27,060 --> 00:09:29,060
So let's actually do that.

150
00:09:29,160 --> 00:09:35,330
First of all I need to actually be fair to the name of this CSX Hellfires object here.

151
00:09:35,600 --> 00:09:35,950
OK.

152
00:09:35,970 --> 00:09:39,410
Now I can just refer to the name of this C H.

153
00:09:39,460 --> 00:09:48,410
Healthy Yes object that sets unclick listener new view that unclick listener.

154
00:09:48,420 --> 00:09:48,890
OK.

