1
00:00:00,420 --> 00:00:06,030
Hi everyone in this theater all we're going to go ahead and create another Android application.

2
00:00:06,270 --> 00:00:09,900
But first of all let's actually configure the Android is OK.

3
00:00:10,050 --> 00:00:16,840
So here just click on this configured here and then click on STK manager and here as you can see let's

4
00:00:16,890 --> 00:00:23,790
just click on this launch as standalone STK manager and then we should wait and then it's going to open

5
00:00:23,790 --> 00:00:25,040
this window for us.

6
00:00:25,050 --> 00:00:30,150
So first of all make sure that you actually install the and realistic tools as you can see here the

7
00:00:30,150 --> 00:00:34,180
latest the latest version Android STK platform tools.

8
00:00:34,380 --> 00:00:36,870
Android is the key tools as you can see here.

9
00:00:36,930 --> 00:00:43,700
Make sure to install the latest version of Android as the big tools here and here as you can see of

10
00:00:43,710 --> 00:00:47,470
here we have this android 7 API API 8:24.

11
00:00:47,700 --> 00:00:52,220
And here make sure to install STK platform here installed.

12
00:00:52,560 --> 00:00:58,870
And here are depending on the on the version of the CPO that you are using.

13
00:00:58,920 --> 00:01:04,100
Make sure to actually install these are for example these are 64.

14
00:01:04,120 --> 00:01:06,310
We ate a system image.

15
00:01:06,540 --> 00:01:07,880
All of these other options.

16
00:01:07,890 --> 00:01:16,680
But because I have actually a Mac and I have actually a 64 bit system I actually installed this one

17
00:01:16,680 --> 00:01:20,280
a Google API is Intel 86 atom system image.

18
00:01:20,910 --> 00:01:22,410
And here as you can see.

19
00:01:22,530 --> 00:01:29,140
Make sure to install the Google a eyes and also make sure to install sources for Android SDK.

20
00:01:29,370 --> 00:01:34,240
If you want to you can actually install documentation for Android SDK here.

21
00:01:34,420 --> 00:01:35,060
OK.

22
00:01:35,220 --> 00:01:41,700
But it's optional you may actually want not to actually install this documentation here and then make

23
00:01:41,700 --> 00:01:43,710
sure to actually install these.

24
00:01:43,710 --> 00:01:45,630
Or Android support repository.

25
00:01:45,690 --> 00:01:46,430
OK.

26
00:01:46,740 --> 00:01:54,540
And make sure to install Google Play services Google a repository and this one Intel X 86 emulator accelerator

27
00:01:54,740 --> 00:01:56,020
hacks them installer OK.

28
00:01:56,040 --> 00:01:58,620
Make sure to install these components.

29
00:01:58,910 --> 00:01:59,460
OK.

30
00:01:59,700 --> 00:02:02,060
So this is really important.

31
00:02:02,070 --> 00:02:05,270
And let's actually go back to here.

32
00:02:05,310 --> 00:02:11,310
Let's actually cancelled here and now we want to actually create an to studio project.

33
00:02:11,310 --> 00:02:16,680
So just click on the start and you add to your project and then for the application name just type in

34
00:02:16,680 --> 00:02:25,050
here app 59 and then click on next and here choose API 16 Android 4.1 jellybean for minimum STK and

35
00:02:25,050 --> 00:02:29,510
then click on next and here choose MT activity next.

36
00:02:29,640 --> 00:02:31,550
And here are do not change anything.

37
00:02:31,590 --> 00:02:33,570
And then click on our finish.

38
00:02:33,780 --> 00:02:36,730
So as you can see here our project is created.

39
00:02:36,870 --> 00:02:41,080
So first of all let's actually design the user interface of our application.

40
00:02:41,130 --> 00:02:46,620
So just double click on the seller's folder and then DoubleClick and this layer folder and here DoubleClick

41
00:02:46,640 --> 00:02:51,630
and the activity under alignment of the examiner and he and as you can see this is the design of our

42
00:02:51,630 --> 00:02:52,550
user interface.

43
00:02:52,680 --> 00:02:56,800
So here are just DoubleClick and this activity Underland mandate's them in here.

44
00:02:57,090 --> 00:03:03,020
And first of all just selectees hello world takes you here and then press on delete key on your keyboard.

45
00:03:03,020 --> 00:03:07,440
And now let's actually track a linearly out vertical.

46
00:03:07,530 --> 00:03:13,650
Actually like linearly as vertical into this relatively healthy you need to actually select a linearly

47
00:03:13,650 --> 00:03:14,400
as vertical.

48
00:03:14,430 --> 00:03:20,490
So just select this text tab here at the bottom as you can see here we have a relatively elsea right.

49
00:03:20,760 --> 00:03:23,160
So here I want to put a linearly out.

50
00:03:23,200 --> 00:03:24,860
Insight is relatively close.

51
00:03:25,020 --> 00:03:29,750
So let's go back to our Design tab here and now I just need to find out there.

52
00:03:29,760 --> 00:03:36,540
So here as you can see inside this palette section we have these layouts folder and inside this labels

53
00:03:36,550 --> 00:03:43,920
folder we can actually find the linearly vertical here as you can see just select it and drag it here

54
00:03:44,040 --> 00:03:46,920
at the center of this relatively out here.

55
00:03:46,920 --> 00:03:47,510
OK.

56
00:03:47,700 --> 00:03:53,660
Now as you can see here we have a linearly vertical inside this relatively out here.

57
00:03:53,730 --> 00:03:54,360
OK.

58
00:03:54,540 --> 00:04:00,660
So I put that really linearly and vertical at the center of this relatively out here.

59
00:04:00,780 --> 00:04:05,220
Now let's actually try a text view into these linearly as vertical.

60
00:04:05,220 --> 00:04:09,850
So as you can see here we have this takes a view here inside this which is smaller.

61
00:04:09,930 --> 00:04:12,040
Just select it and drag it here.

62
00:04:12,330 --> 00:04:14,030
As you can see and put it here.

63
00:04:14,250 --> 00:04:15,470
As you can see here.

64
00:04:15,540 --> 00:04:18,800
So as you can see we have this text view.

65
00:04:19,170 --> 00:04:24,080
And in the on the right hand side you can see these properties as you can see.

66
00:04:24,170 --> 00:04:27,840
And for the lay out feet here as you can see it says Match parent.

67
00:04:27,840 --> 00:04:30,720
And for the lay out height it says ALAP content.

68
00:04:31,080 --> 00:04:33,360
And this text is text view.

69
00:04:33,360 --> 00:04:36,990
So let's actually to change the text view or the text of the state's view.

70
00:04:37,190 --> 00:04:40,550
So they are selected and deleted aren't here just typing.

71
00:04:40,560 --> 00:04:44,940
Welcome to our Welcome to intermediate

72
00:04:48,010 --> 00:04:55,360
Android programming programming section

73
00:04:58,320 --> 00:05:01,170
OK and that person enter key on your keyboard.

74
00:05:01,500 --> 00:05:06,220
And now I want to actually increase the size of these artists view.

75
00:05:06,270 --> 00:05:09,660
So here at the bottom you can see it is you all properties.

76
00:05:09,660 --> 00:05:13,840
Just click on it and here as you can see we have all these properties here.

77
00:05:13,950 --> 00:05:18,890
First of all let's actually change the ID of the stakes you so just selected here.

78
00:05:19,020 --> 00:05:24,810
And for the idea just typing here th the welcome or Tastee welcome as you can see here and in person

79
00:05:24,840 --> 00:05:26,730
enter here on your keyboard.

80
00:05:26,730 --> 00:05:30,500
And then let's actually find the text size attribute.

81
00:05:30,660 --> 00:05:35,970
So here as you can see we have we need to actually find the text size as tribute.

82
00:05:35,980 --> 00:05:40,880
So now I should actually scroll here.

83
00:05:40,920 --> 00:05:47,310
So in order to find the text size attribute I just need to scroll down here as you can see just scrolling

84
00:05:47,310 --> 00:05:48,970
down on here.

85
00:05:49,200 --> 00:05:52,260
As you can see we have all these attributes.

86
00:05:52,260 --> 00:05:55,580
And here we just need to find the text size attribute.

87
00:05:55,680 --> 00:05:58,290
So as you can see this is the text size attribute.

88
00:05:58,440 --> 00:06:00,790
So let me actually make this area wider.

89
00:06:00,840 --> 00:06:07,140
We have this takes this attribute and it says at sign D-men slash tick size small here as you can see

90
00:06:07,140 --> 00:06:10,910
we have all this text material take size small material.

91
00:06:10,920 --> 00:06:12,090
So what is this.

92
00:06:12,090 --> 00:06:14,640
So let's actually go to our pratique project structure.

93
00:06:14,640 --> 00:06:19,100
So I just hold the command key and then press the number one key on my keyboard.

94
00:06:19,110 --> 00:06:24,600
So if you want to you can actually click on View tool windows and then project and hand as you can see

95
00:06:24,600 --> 00:06:26,260
inside this app here.

96
00:06:26,400 --> 00:06:30,990
Inside this red folder here as you can see we have these values folder.

97
00:06:31,110 --> 00:06:37,410
So just open it and here and as you can see we have some xml files here as you can see for this text

98
00:06:37,410 --> 00:06:38,090
size here.

99
00:06:38,100 --> 00:06:42,630
As you can see we have this at sign smiled at sign a demon right.

100
00:06:42,630 --> 00:06:48,250
So it says it is actually referring this referring to this folder here to this directory.

101
00:06:48,480 --> 00:06:50,140
So let's open this directory here.

102
00:06:50,250 --> 00:06:55,280
As you can see here we have these demons that examine and demonstrate examine and inside the Prentice's

103
00:06:55,290 --> 00:06:58,720
you can see this value w eight hundred twenty.

104
00:06:58,830 --> 00:07:02,560
DP So we don't want to actually work on this example and fight.

105
00:07:02,700 --> 00:07:06,900
We just want to work on this exemplify demons that said so publicly Genet.

106
00:07:07,080 --> 00:07:12,660
And as you can see here inside this is exemplified here as you can see inside these resources packed

107
00:07:12,780 --> 00:07:13,290
here.

108
00:07:13,350 --> 00:07:18,150
We have these values the men name activity horizontal Margene.

109
00:07:18,150 --> 00:07:22,530
This is the name of our value and this is the actual value 16 DP.

110
00:07:22,950 --> 00:07:29,490
And here we have this demon here the man name activity of vertical Margene 16 DP and as you can see

111
00:07:29,490 --> 00:07:32,570
this is the name of this value.

112
00:07:32,760 --> 00:07:34,710
And this is the actual value.

113
00:07:34,860 --> 00:07:37,600
So the China actually used these values.

114
00:07:37,660 --> 00:07:43,920
This string these actually these string values these examen values in order to refer to these actual

115
00:07:43,920 --> 00:07:49,840
values instead of hard coding our values inside our properties.

116
00:07:49,860 --> 00:07:57,620
As you can see here I can just put a name and an I can I can literally create art Hagg here for example

117
00:07:57,630 --> 00:07:59,780
inside these demons.

118
00:08:00,120 --> 00:08:06,060
Demons that exemplify arge and create some packs and I can actually put those values here and instead

119
00:08:06,060 --> 00:08:13,350
of hard coding our values here and assigning those values to our text size or other attributes are collected

120
00:08:13,350 --> 00:08:18,510
or referred to those names and it and it is better it's way better.

121
00:08:18,510 --> 00:08:25,260
So at this time let's go inside the statements for the here and now I can actually create attack and

122
00:08:25,550 --> 00:08:29,340
I can just say D-men and the name is going to be.

123
00:08:29,460 --> 00:08:36,180
For example welcome Welkom text size as you can see here.

124
00:08:36,570 --> 00:08:38,900
And I just need to put a closing tag here.

125
00:08:39,000 --> 00:08:44,600
And inside these tags again just typing for example a 50 dpi.

126
00:08:45,200 --> 00:08:51,510
But but because I am actually specifying the size of my text view OK the size of the text of my text

127
00:08:51,510 --> 00:08:53,910
view it's better to put a speed.

128
00:08:54,230 --> 00:08:54,750
OK.

129
00:08:54,900 --> 00:08:56,040
This is very important.

130
00:08:56,040 --> 00:09:01,140
50 Espey And now let's actually go back into that activity underline minute example.

131
00:09:01,140 --> 00:09:04,940
So now let's actually click on this text tab here at the bottom.

132
00:09:04,950 --> 00:09:09,450
Just click on this takes tab and here as you can see we have this takes you right.

133
00:09:09,480 --> 00:09:14,090
So now I want to actually assign the size of this text view.

134
00:09:14,280 --> 00:09:16,290
I want to specify the size of this text view.

135
00:09:16,290 --> 00:09:20,270
So here I can just type in text text size.

136
00:09:20,520 --> 00:09:26,210
And as you can see the autocomplete feature is now allowing me to actually choose this one and code

137
00:09:26,210 --> 00:09:27,150
and text size.

138
00:09:27,150 --> 00:09:32,660
So if I actually press on interview on my keyboard and in the in the double quotes I can actually type

139
00:09:32,660 --> 00:09:40,310
in at sign D-men as you can see here slash Sahira as you can see we have this value Welkom underlined

140
00:09:40,310 --> 00:09:41,670
based on the length size.

141
00:09:41,670 --> 00:09:46,920
So if we put that value we put this value inside our demands that exemplified right.

142
00:09:47,100 --> 00:09:53,400
So I can actually select this one here and here as you can see let's go back to our design tab at the

143
00:09:53,400 --> 00:09:55,430
bottom as you can see we have these two taps.

144
00:09:55,440 --> 00:09:57,670
So I just need a this design type here.

145
00:09:57,690 --> 00:10:02,080
And as you can see here the size of our takes is actually changed.

146
00:10:02,190 --> 00:10:02,820
OK.

147
00:10:02,970 --> 00:10:06,670
Now the size of our takes is actually 50 espie.

148
00:10:06,980 --> 00:10:09,270
OK but you're referring to this name.

149
00:10:09,360 --> 00:10:12,140
I could actually get disvalue 50 s.p.

150
00:10:12,420 --> 00:10:18,930
So here inside this activity underline minute exam I actually changed the size of the of these takes

151
00:10:18,930 --> 00:10:19,440
view.

152
00:10:19,500 --> 00:10:23,520
Welcome to Android programming section on here.

153
00:10:23,820 --> 00:10:29,440
Let's actually find the gravity attribute that is related to this text view.

154
00:10:29,460 --> 00:10:35,400
So I just need to scroll down here scroll at the bottom as you can see here we have this gravity attribute.

155
00:10:35,400 --> 00:10:40,220
So I just need to open this gravity strip by just click on this little triangle here.

156
00:10:40,380 --> 00:10:42,750
And here we have these values.

157
00:10:42,780 --> 00:10:48,430
So here I just need to check this cental underline horizontal checkbox here.

158
00:10:48,510 --> 00:10:50,070
Just check this one here.

159
00:10:50,070 --> 00:10:57,830
The center underline horizontal and as you can see here our text is actually centered inside this text

160
00:10:57,850 --> 00:10:58,420
view.

161
00:10:58,710 --> 00:10:59,440
OK.

162
00:10:59,640 --> 00:11:06,610
So if I want to actually centered this text view here inside this linearly or vertical I need to actually

163
00:11:06,630 --> 00:11:08,560
change the layout gravity.

164
00:11:08,760 --> 00:11:13,970
So here let's actually go inside this text tab here as you can see.

165
00:11:14,130 --> 00:11:19,820
And now as you can see here we have this gravity attribute that is actually added to this text view

166
00:11:19,830 --> 00:11:21,080
here as you can see.

167
00:11:21,090 --> 00:11:27,750
So now I can actually change the layout gravity and this layout gravity is going to determine how this

168
00:11:27,750 --> 00:11:31,260
text is going to be positioned inside this linearly out.

169
00:11:31,430 --> 00:11:31,950
OK.

170
00:11:32,160 --> 00:11:40,290
So here I put this value Android Colan lay out underlying gravity center underline horizontally as you

171
00:11:40,290 --> 00:11:41,070
can see here.

172
00:11:41,190 --> 00:11:43,000
So let's go back to our design tab here.

173
00:11:43,020 --> 00:11:49,510
As you can see now as you can see we have this text view that is actually centered horizontally inside

174
00:11:49,540 --> 00:11:51,300
is nearly vertical.

175
00:11:51,420 --> 00:11:56,460
So as you can see here the layout of this takes you is actually much panning right.

176
00:11:56,460 --> 00:11:59,310
So let's change this value to wrap content.

177
00:11:59,310 --> 00:12:04,010
Now you can see the layout width of my text view is Lappe content.

178
00:12:04,020 --> 00:12:09,110
So now let's actually change the text size of this text view.

179
00:12:09,120 --> 00:12:15,300
So here we have this text size attribute and here instead of disvalue 50 espie are concerned about the

180
00:12:15,300 --> 00:12:17,240
number can speak.

181
00:12:17,580 --> 00:12:20,080
And if we actually press on until Q On my keyboard.

182
00:12:20,250 --> 00:12:28,640
Now we can see here this takes you is actually centered horizontally inside this linearly as vertical.

183
00:12:28,880 --> 00:12:29,520
OK.

184
00:12:29,760 --> 00:12:31,390
So hopefully that makes sense.

