1
00:00:00,270 --> 00:00:02,280
Hello this is Martha's Dockerty.

2
00:00:02,430 --> 00:00:07,670
And in this story we're going to start creating our first Android studio project.

3
00:00:07,890 --> 00:00:12,690
So in order to create an android studio project you just need to click on this option here that says

4
00:00:12,870 --> 00:00:13,350
Sard.

5
00:00:13,380 --> 00:00:15,330
And you and it's true to your project.

6
00:00:15,660 --> 00:00:18,190
And here we need to specify the application name.

7
00:00:18,510 --> 00:00:20,770
So the application name can be.

8
00:00:20,880 --> 00:00:24,250
Hello and hi.

9
00:00:25,130 --> 00:00:28,460
Where is the name of the application application.

10
00:00:28,690 --> 00:00:30,600
Can't specify the company domain.

11
00:00:30,780 --> 00:00:39,660
So the company domain is used to generate a unique package name to a unique package name is actually

12
00:00:39,780 --> 00:00:44,330
your the identifier of your application in the Google Play Store.

13
00:00:44,340 --> 00:00:47,880
Generally we use a reverse domain names.

14
00:00:48,000 --> 00:00:56,100
So instead of this domain that are used as a site that that example that come of use Come dot for example

15
00:00:56,100 --> 00:01:07,110
whatever value what ever value you got for example another value for example my name write be used diverse

16
00:01:07,140 --> 00:01:09,030
domain names for our company.

17
00:01:09,060 --> 00:01:15,270
And as you can see here as I change the name the value of this company Ptomaine the package name is

18
00:01:15,270 --> 00:01:16,110
also changed.

19
00:01:16,110 --> 00:01:21,210
So you can see this value here MOTSS up that whatever value that come up that hello.

20
00:01:21,250 --> 00:01:28,670
And Hollywood this is a unique package name a unique identifier for our application in the Google place.

21
00:01:28,800 --> 00:01:30,230
So it must be unique.

22
00:01:30,240 --> 00:01:34,370
Make sure to choose a unique value for the package name.

23
00:01:34,410 --> 00:01:37,920
And if you want to you can edit this package by just clicking on this.

24
00:01:37,930 --> 00:01:40,590
It is put in here at the right hand side.

25
00:01:40,620 --> 00:01:47,070
We have also this project location so if you want to you can change the location of your project inside

26
00:01:47,070 --> 00:01:48,060
your computer.

27
00:01:48,360 --> 00:01:53,510
And we have these two options include C++ support and include courtliness support.

28
00:01:53,520 --> 00:01:57,560
So we do not want to add C++ or Cawthorne into our project.

29
00:01:57,600 --> 00:02:02,710
We want to use Java to our in our projects so don't chase these checkboxes here.

30
00:02:02,730 --> 00:02:04,590
Just click on next here.

31
00:02:04,590 --> 00:02:11,180
It says Target Android devices select the form factors and minimal the.

32
00:02:11,190 --> 00:02:18,300
First let me tell you that we are not going to create Android Wear TV or adult or tool or Android things

33
00:02:18,650 --> 00:02:25,800
applications we are just going to only target phone and tablet in discourse and here and here we can

34
00:02:25,800 --> 00:02:30,020
specify the minimum STK that your application can run.

35
00:02:30,210 --> 00:02:31,230
What is the minimum STK.

36
00:02:31,230 --> 00:02:36,570
So for example it may choose API or 16 Android 4.1 developing.

37
00:02:36,590 --> 00:02:44,790
If we choose this option its as by targeting API 16 and later as the minimum SDK it your app will run

38
00:02:44,850 --> 00:02:52,230
on approximately ninety nine point two percent of devices that are actually live in Google place thought

39
00:02:52,500 --> 00:02:58,920
the minimal SDK is going to specify the minimum operating system that the minimal version of the Android

40
00:02:58,920 --> 00:03:01,950
operating system that can run your app.

41
00:03:01,950 --> 00:03:07,940
So here we say for example Android 4.1 gelatine is going to be the minimum STK.

42
00:03:08,120 --> 00:03:15,100
So here you can also check this checkbox that says include Android instant apps aport So check this

43
00:03:15,100 --> 00:03:15,960
checkbox.

44
00:03:16,190 --> 00:03:19,390
You can actually just enable this option later.

45
00:03:19,430 --> 00:03:24,040
For now just do not check that check box and just click on next.

46
00:03:24,110 --> 00:03:27,170
Here we have some activities.

47
00:03:27,410 --> 00:03:34,070
So lets choose basic activity for this application because this is basic activity it comes up with a

48
00:03:34,070 --> 00:03:37,510
menu option and a floating action button already.

49
00:03:37,760 --> 00:03:44,090
But these are just templates and we can for example add if you choose for example interactivity you

50
00:03:44,090 --> 00:03:49,630
can add for example menu options or floating action button to your activity.

51
00:03:49,730 --> 00:03:53,690
You can add maps logging activity or lots of other features.

52
00:03:53,690 --> 00:03:59,820
For example navigation Troyer scroll scrolling activity settings activity and lots of other tablets.

53
00:03:59,930 --> 00:04:03,370
These are just templates that you can start your app with.

54
00:04:03,440 --> 00:04:09,650
You dont have to choose for example a specific activity but if your app for example starts with a map

55
00:04:09,950 --> 00:04:12,070
Google Maps activity you can use this template.

56
00:04:12,230 --> 00:04:17,810
But for analysis basic activity here that comes with our menu option and the floating action button

57
00:04:18,110 --> 00:04:19,880
and just click next.

58
00:04:19,910 --> 00:04:22,770
Here we have some other options.

59
00:04:22,850 --> 00:04:30,680
It says create a new basic activity that app bar so app part is at the top here you can see it comes

60
00:04:30,680 --> 00:04:33,080
to be dispatched button menu option.

61
00:04:33,080 --> 00:04:37,570
So here for example it says activity name so I'll talk more about activity names.

62
00:04:37,570 --> 00:04:44,420
For now you may not know about activities or layouts or for example the title for now just leave these

63
00:04:44,420 --> 00:04:50,530
values as default and also we are not going to use fragment in this application so do not checkbox.

64
00:04:50,540 --> 00:04:51,760
Check this checkbox.

65
00:04:51,770 --> 00:04:56,960
Just leave these values as default you are going to master these concepts later in this course and just

66
00:04:56,960 --> 00:05:01,900
click on finish in order to create our first Android studio project.

67
00:05:01,910 --> 00:05:08,660
So now that our project is created you can see this tip of the dialog that opens so it can actually

68
00:05:08,660 --> 00:05:13,930
teach you something about the I-T integrated development environment.

69
00:05:13,940 --> 00:05:15,590
Here we can learn something.

70
00:05:15,720 --> 00:05:18,250
If you just can actually close this dialog.

71
00:05:18,410 --> 00:05:20,900
So now our project is created.

72
00:05:20,900 --> 00:05:24,740
We have lots of things here at the left hand side.

73
00:05:24,740 --> 00:05:26,180
We have the Android view.

74
00:05:26,360 --> 00:05:28,030
We have the palette section.

75
00:05:28,130 --> 00:05:33,350
We have to lay out at the right hand side we have the attributes section so we are going to learn all

76
00:05:33,350 --> 00:05:35,860
about these things later in this course.

77
00:05:35,870 --> 00:05:42,370
But for now I'm going to just introduce you to these components that make the android app.

78
00:05:42,380 --> 00:05:48,780
So first let's talk about this site but at the left we have this android view.

79
00:05:48,800 --> 00:05:51,440
So for you it may not be Android view.

80
00:05:51,710 --> 00:05:56,480
And if you want to actually open Deandra view you can see these two little triangles here.

81
00:05:56,480 --> 00:06:01,240
If I click on it we have the surprise at the packages scratches and.

82
00:06:01,430 --> 00:06:08,120
You should always choose Android If you want to actually create Android apps because it can actually

83
00:06:08,120 --> 00:06:15,700
show you their files and the packages that are required that you need to actually manipulate.

84
00:06:15,710 --> 00:06:18,870
If you want to create your your specific Android app.

85
00:06:19,130 --> 00:06:23,260
So for example if you open this app for their behalf this manifests.

86
00:06:23,450 --> 00:06:27,670
So if you open this manifest we have this android manifest that them all white.

87
00:06:27,830 --> 00:06:30,500
So let me double click on this fight and manifest.

88
00:06:30,740 --> 00:06:33,210
And here now you can see this tab is opened.

89
00:06:33,350 --> 00:06:39,260
Let me double click on this tab in order to make this area wider so the manifest file is going to contain

90
00:06:39,650 --> 00:06:43,050
some general information about your application.

91
00:06:43,460 --> 00:06:49,580
So we have this application tag and inside the stack for example we have some attributes that you're

92
00:06:49,580 --> 00:06:52,310
going to learn later but for now let me talk about some of them.

93
00:06:52,400 --> 00:06:59,720
For example this I can attribute the attribute is going to specify the icon of the application that

94
00:06:59,720 --> 00:07:02,340
is run on the user's device.

95
00:07:02,570 --> 00:07:09,410
So for example I'm going to teach you later how you can run your app on an emulator but for now let

96
00:07:09,410 --> 00:07:16,340
me run the app because I have already created one emulator so for now you don't have to worry about

97
00:07:16,340 --> 00:07:20,680
the emulator later you are going to learn how to create your own emulator.

98
00:07:20,690 --> 00:07:28,190
But for now let me show you that when it says luncher or icon you can see that it means this icon here

99
00:07:28,870 --> 00:07:36,320
is going to create a default icon for you and it can just put it as the icon of your application.

100
00:07:36,320 --> 00:07:41,350
So this is our application running on this emulator here at the top.

101
00:07:41,360 --> 00:07:41,950
You can see this.

102
00:07:41,990 --> 00:07:45,590
Hello and hi world takes at the right hand side.

103
00:07:45,590 --> 00:07:52,310
We have this menu option and we have this hello world at the center and we have also this floating in

104
00:07:52,310 --> 00:07:54,060
action button here at the bottom.

105
00:07:54,230 --> 00:07:57,070
So we are going to learn more about this floating nation button later.

106
00:07:57,170 --> 00:08:01,150
But for now let's just go back to our studio to our manifest fight.

107
00:08:01,190 --> 00:08:08,000
We have this label attribute right the label attribute that is going to actually to refer to our name

108
00:08:08,270 --> 00:08:09,870
inside strings that exemplified.

109
00:08:09,890 --> 00:08:14,480
So you're going to learn more about these things that exemplified don't Vody so we can see this.

110
00:08:14,510 --> 00:08:15,810
Hello and Heibel here.

111
00:08:15,920 --> 00:08:18,950
So this is the value label right.

112
00:08:19,100 --> 00:08:25,640
We have the round icons so if you take a look at the icons here you can see that the icons are rounded.

113
00:08:25,820 --> 00:08:34,370
So that's because of this attribute here we have supports RTL attributes so support 3L means support

114
00:08:34,700 --> 00:08:37,460
right to left languages.

115
00:08:37,460 --> 00:08:40,380
So we just it automatically by default.

116
00:08:40,380 --> 00:08:41,760
The value is true.

117
00:08:42,150 --> 00:08:48,190
You're going to learn how to translate your applications to other languages later in discourse.

118
00:08:48,200 --> 00:08:49,720
So this feature is very good.

119
00:08:49,720 --> 00:08:52,290
This attribute is really helpful.

120
00:08:52,610 --> 00:08:54,920
And here we have this theme.

121
00:08:55,010 --> 00:09:00,840
So the FEMA attribute is going to specify the style of your app and the theme of your app later in this

122
00:09:00,840 --> 00:09:01,290
course.

123
00:09:01,400 --> 00:09:06,590
But again you're going to learn more about all about actually themes in Android and how to use Android

124
00:09:06,680 --> 00:09:09,420
material design in your applications.

125
00:09:09,620 --> 00:09:16,130
If you have this activity tag so the activity tag is going to for every activity that you have inside

126
00:09:16,130 --> 00:09:21,730
your application there must be an activity declared inside the Android manifest that is modified.

127
00:09:22,010 --> 00:09:25,040
So an application only has the one activity.

128
00:09:25,040 --> 00:09:26,150
So let me open it.

129
00:09:26,270 --> 00:09:27,620
It is only one activity.

130
00:09:27,710 --> 00:09:33,730
But and again see that one activity tag is actually created inside the average manifested exemplified.

131
00:09:33,890 --> 00:09:38,750
And these are the attributes of our activities So for example the name of the activity is that main

132
00:09:38,750 --> 00:09:46,160
activity starts main activity the first to the package name of the activity that this main activity

133
00:09:46,160 --> 00:09:47,720
actually exists.

134
00:09:47,720 --> 00:09:53,480
So let me show you the Android view if you want to open the Android view at the top here.

135
00:09:53,480 --> 00:09:58,110
He just lets you click on View tool windows and then click on Project.

136
00:09:58,400 --> 00:09:58,930
OK.

137
00:09:59,150 --> 00:10:04,820
So at the left hand side you can see that we have this job of all that and this is the name of the package.

138
00:10:04,910 --> 00:10:05,480
Right.

139
00:10:05,510 --> 00:10:09,070
And inside this package we have the main activity file.

140
00:10:09,080 --> 00:10:11,220
If you open it you can see this me and humidified.

141
00:10:11,270 --> 00:10:17,030
So it's going to it is actually referring to this name of the package that main activity the main activity

142
00:10:17,690 --> 00:10:20,140
is actually inside this package.

143
00:10:20,480 --> 00:10:23,310
We have the label of the activity right.

144
00:10:23,570 --> 00:10:29,170
And we have also the fien the this time we have this intent filter tag.

145
00:10:29,320 --> 00:10:34,870
So because our main activity is going to be the lantern activity it is this task is created for this

146
00:10:34,870 --> 00:10:35,610
activity.

147
00:10:35,800 --> 00:10:39,980
It is the main and lot activity you're going to learn more about this later.

148
00:10:40,000 --> 00:10:44,210
For now I just turned 40 and it just wanted to introduce you to the Ad-Rock manifested decimal.

149
00:10:44,220 --> 00:10:48,320
So let me close this and with manifested example fine.

150
00:10:48,530 --> 00:10:49,660
So are the left hand side.

151
00:10:49,670 --> 00:10:55,100
We have this again Jawa folder inside the subfolder we have this package that is going to contain all

152
00:10:55,100 --> 00:10:58,060
of our actually java files.

153
00:10:58,250 --> 00:11:02,360
So we only have one activity on top of the main activity.

154
00:11:02,360 --> 00:11:07,370
So I just cannot have that we can be you know to make this area wider so we can see that these are the

155
00:11:07,370 --> 00:11:09,050
Java codes for now.

156
00:11:09,050 --> 00:11:14,670
If you don't know anything about Java Don't worry you're going to master Java programming.

157
00:11:14,970 --> 00:11:16,430
Lagering discourse.

158
00:11:16,430 --> 00:11:18,880
And here you can see for example the uncreate.

159
00:11:18,930 --> 00:11:23,840
Is this is actually one of the Amlet lifecycle methods and some other methods that you're going to learn

160
00:11:23,930 --> 00:11:25,090
more about later.

161
00:11:25,340 --> 00:11:27,590
So let's close this profile.

162
00:11:27,980 --> 00:11:29,400
Let me close with this example.

163
00:11:29,420 --> 00:11:32,980
So here we have two other packages that are not going to work with.

164
00:11:33,020 --> 00:11:35,410
So let's just close these packets here.

165
00:11:36,370 --> 00:11:38,140
And here we have this race folder.

166
00:11:38,150 --> 00:11:39,320
So this is really important.

167
00:11:39,340 --> 00:11:44,710
The first folder that you can see here is the tribal folder the dreidel for that is going to contain

168
00:11:45,010 --> 00:11:50,140
all of the images that and resources that you're going to use inside that application and you are going

169
00:11:50,140 --> 00:11:53,930
to copy and paste or images inside this job tribal folder.

170
00:11:54,250 --> 00:12:00,130
And here we have this layout folder the layout where that is going to contain the main layouts.

171
00:12:00,220 --> 00:12:08,730
And for example there are literally outs that are going to be related to our activities inside our project.

172
00:12:08,770 --> 00:12:14,790
So if we have this activity under a limited example and we have this content on the last minute segment

173
00:12:15,160 --> 00:12:21,760
so now you may ask that we have only one activity void we have to separate out the activity and the

174
00:12:21,760 --> 00:12:28,250
content and that's because we have chosen the basic activity.

175
00:12:28,270 --> 00:12:34,120
When I when we wanted to actually specify the templates the initial template of our application.

176
00:12:34,120 --> 00:12:38,660
So here we have the activity under Lemnitzer similis actually open this file.

177
00:12:38,710 --> 00:12:41,640
Let me double click on the slab in order to make this area wider.

178
00:12:41,830 --> 00:12:47,560
So here in this activity if I click on it as you can see I cannot interact with this hello world view

179
00:12:47,950 --> 00:12:55,180
by which I can see for example interact with this but the have all this action here at the bottom at

180
00:12:55,180 --> 00:13:01,600
the bottom here we have two taps the Design tab and the text that if I switch to the text that you can

181
00:13:01,600 --> 00:13:07,090
see that we have the coordinator a out as the parents lay out.

182
00:13:07,090 --> 00:13:08,590
So these are the actual codes.

183
00:13:08,920 --> 00:13:12,410
And here we have some other tasks here.

184
00:13:12,550 --> 00:13:19,390
But here I want to show you that what every kid that you put inside the XML file is going in it's going

185
00:13:19,390 --> 00:13:24,610
to be reflected in say this Design tab and about the work that you put inside this Design tab is going

186
00:13:24,610 --> 00:13:27,510
to be reflected inside these XML codes.

187
00:13:27,520 --> 00:13:32,260
This means that the Design tab and the text up are actually interrelated.

188
00:13:32,260 --> 00:13:37,500
So for example we have these a floating action button tag here inside this XML file.

189
00:13:37,780 --> 00:13:43,140
So this is actually the codes that have created the floating action button here inside this design.

190
00:13:43,150 --> 00:13:47,620
Having said this earlier let me switch to the text that now at the right hand side you can see this

191
00:13:47,620 --> 00:13:50,670
preview if you click on it you can see the preview of the layout.

192
00:13:50,980 --> 00:13:52,350
And here are the example codes.

193
00:13:52,430 --> 00:13:53,930
Then I select this tag.

194
00:13:54,040 --> 00:13:59,200
You can see that there the inside this preview the fluting action button is actually selected right.

195
00:13:59,200 --> 00:14:04,510
Or for example if I select the frozen action button inside this preview it's going to highlight the

196
00:14:04,510 --> 00:14:06,040
floating action but intact.

197
00:14:06,040 --> 00:14:11,980
So now let's highlight the floating action but attack and let's delete the stack and you can see that

198
00:14:11,990 --> 00:14:16,130
the action button is actually also deleted inside is left right.

199
00:14:16,150 --> 00:14:20,910
So if I undo my action now the floating action button is back right.

200
00:14:22,060 --> 00:14:30,450
So here this activity is activity on the no minute segment actually contains the cult content underlining

201
00:14:30,480 --> 00:14:31,160
that.

202
00:14:31,390 --> 00:14:37,580
Because of this tag it says include lay out and we have two codes at sign out.

203
00:14:37,600 --> 00:14:42,420
It is referring to the layout slash content underly minute example.

204
00:14:42,430 --> 00:14:46,530
So when it says at layout it is referring to the ATS to the layout folder.

205
00:14:46,630 --> 00:14:48,000
So let me read and review.

206
00:14:48,070 --> 00:14:51,330
I just use the shortcut.

207
00:14:51,460 --> 00:14:56,410
So if you want to learn what is the shortcut you can see at the top you just need to click on view to

208
00:14:56,410 --> 00:14:57,030
Windows.

209
00:14:57,070 --> 00:15:02,590
And here we have this project and here it is the shortcut formalities command the one for Windows.

210
00:15:02,590 --> 00:15:04,720
I think it is a control one.

211
00:15:05,170 --> 00:15:11,620
So here you can see that we have activity on eliminativism ad and content underlayment that examine

212
00:15:11,640 --> 00:15:13,120
inside this layout folder.

213
00:15:13,270 --> 00:15:17,280
So then it says at sign the out it is referring to this layout folder.

214
00:15:17,350 --> 00:15:22,880
And here it is actually including the content underlayment that examen exemplified.

215
00:15:23,020 --> 00:15:28,930
So this activity underly I mean an example actually includes the content on the I in that example you

216
00:15:28,930 --> 00:15:31,840
can see some other attacks or you're going to learn more about it later.

217
00:15:31,840 --> 00:15:36,640
So for example we have this toolbar that we offered to preview if I select it to anybody can see this

218
00:15:36,790 --> 00:15:39,030
toolbar that is actually selected here.

219
00:15:39,250 --> 00:15:43,650
We have this app bar layout that actually contains the toolbar.

220
00:15:43,990 --> 00:15:47,780
So this app really out is the parent of this toolbar.

221
00:15:47,950 --> 00:15:51,510
You're going to more about learn more about this later in this course.

222
00:15:51,880 --> 00:15:53,380
So let me close this preview.

223
00:15:53,660 --> 00:15:59,110
And here let's go inside this content underlayment an example that we had the hand is that you know

224
00:15:59,160 --> 00:16:04,260
there's this area right there and here you can see inside this content the minute exam and we cannot

225
00:16:04,290 --> 00:16:09,790
interact with this floating action button but because this a floating action pattern is declared inside

226
00:16:09,790 --> 00:16:11,700
the activity other than the underlying.

227
00:16:11,750 --> 00:16:12,830
I mean are they similar.

228
00:16:12,880 --> 00:16:13,630
Right.

229
00:16:13,630 --> 00:16:15,120
So now we have this hello world.

230
00:16:15,130 --> 00:16:16,560
We can interact with this hello world.

231
00:16:16,570 --> 00:16:20,300
We can select the hello world and then press ideality on our keyboard.

232
00:16:20,740 --> 00:16:26,740
But here in this course first we are going to master relatively out and linearly else and our course

233
00:16:26,800 --> 00:16:33,880
is already created with our constraints laid out so you can see at the bottom left hand side we have

234
00:16:33,880 --> 00:16:36,070
this componentry section right.

235
00:16:36,190 --> 00:16:41,000
This componentry section is going to specify the hierarchy of views that are inside your layout.

236
00:16:41,200 --> 00:16:45,050
So here we have the constraint lay out as the root lay out.

237
00:16:45,070 --> 00:16:46,630
We don't want this to happen.

238
00:16:46,720 --> 00:16:53,620
So whenever we create and write applications in the scores especially at the beginning of the scores

239
00:16:54,100 --> 00:17:00,640
you can see that the insert is componentry the relative lay out is actually the lay out in order to

240
00:17:00,640 --> 00:17:06,010
change the constraints out to relatively out you need to just switch to the text.

241
00:17:06,310 --> 00:17:11,310
And here it says and do it that supports the constraints that constraints lead to highlight disvalue

242
00:17:11,410 --> 00:17:16,260
here and just type in here relatively out with capital R.

243
00:17:16,360 --> 00:17:22,740
So as you can see as I'm typing relatively out the ending tag of this route lay out is also changing.

244
00:17:22,930 --> 00:17:27,010
So I'm just going to say that it's relatively out and then press and enter key on your keyboard.

245
00:17:27,310 --> 00:17:35,410
So now the route lay out is going to be relatively out and here is relatively out now contains this

246
00:17:35,410 --> 00:17:35,900
text.

247
00:17:35,920 --> 00:17:37,380
So let's switch to that is right.

248
00:17:37,420 --> 00:17:44,490
Now you can see this hello world view is at the top left hand corner of this play out.

249
00:17:44,740 --> 00:17:45,960
OK.

250
00:17:45,970 --> 00:17:50,630
So here you can see that we have this pallet section.

251
00:17:50,710 --> 00:17:56,830
So this pallet section contains the components the user interface components that you are going to actually

252
00:17:56,890 --> 00:17:58,360
add to our layout.

253
00:17:58,660 --> 00:18:03,460
So for example we have the spotted we can add a button to our related relatively out here.

254
00:18:03,740 --> 00:18:06,750
You're going to learn more about relatively out later in this course.

255
00:18:06,760 --> 00:18:12,090
Phone I just thought very relatively out means positioning items in relative to each other.

256
00:18:12,310 --> 00:18:12,920
OK.

257
00:18:13,180 --> 00:18:20,110
So here for example we have this toggle button checkbox radio button checked text view and lots of other

258
00:18:20,110 --> 00:18:21,920
components that you're going to use later.

259
00:18:22,090 --> 00:18:28,980
But for now you have this pallet all you can click on widgets in order to see less components.

260
00:18:29,050 --> 00:18:30,320
We have text.

261
00:18:30,430 --> 00:18:35,890
So for example if you want to add a takes you to your layout you just need to select Stacey and just

262
00:18:35,890 --> 00:18:38,820
drag it here into our into your relatively out.

263
00:18:39,250 --> 00:18:45,070
So here to say that it takes you on the right hand side we have these attributes that are related to

264
00:18:45,070 --> 00:18:45,910
the state's view.

265
00:18:45,910 --> 00:18:51,830
We have the ID the ID is used so that whenever we want to interact with this takes you from our job

266
00:18:51,830 --> 00:18:53,940
of course we are going to revert to this.

267
00:18:53,950 --> 00:18:55,760
So the idea is very important.

268
00:18:55,990 --> 00:18:58,680
We have to lay out with the lay out height the lay out what it is.

269
00:18:58,680 --> 00:19:02,500
It is going to specify the Veach it takes you out.

270
00:19:02,500 --> 00:19:09,270
So for example currently it is raw content rap content means and wrapping around the content of this

271
00:19:09,290 --> 00:19:12,800
layout so the text view is actually layout right.

272
00:19:13,270 --> 00:19:19,490
And when we say wrap content it is going to wrap around the content the content is the text inside this

273
00:19:19,490 --> 00:19:20,870
text view here.

274
00:19:20,950 --> 00:19:24,780
So we can also change it to match parent.

275
00:19:24,780 --> 00:19:31,110
Right now the text view lay out with is match parent parent refers to the parent of this takes you inside

276
00:19:31,110 --> 00:19:32,480
this component resection.

277
00:19:32,580 --> 00:19:34,740
You can see the hierarchy of views.

278
00:19:34,830 --> 00:19:37,470
So we have this takes you inside is relatively out.

279
00:19:37,470 --> 00:19:43,560
This means this relatively new out is the parent of this view and this this is the child of this relatively

280
00:19:43,560 --> 00:19:44,080
out.

281
00:19:44,110 --> 00:19:48,430
So then it's as much a parent as they lay out which of these text view.

282
00:19:48,570 --> 00:19:57,020
This means the veto of this takes you is going to be matched to the beat of the parent which is this

283
00:19:57,030 --> 00:19:57,860
relatively out.

284
00:19:57,960 --> 00:20:02,760
But you can see there is still some space here and because this attribute is now conflicting with other

285
00:20:02,760 --> 00:20:03,700
attributes.

286
00:20:03,720 --> 00:20:08,680
So you're going to master a master relatively later in this course for now just on 40.

287
00:20:08,700 --> 00:20:10,390
We have this lay out high.

288
00:20:10,420 --> 00:20:13,120
You can also change the raw content to match parent.

289
00:20:13,160 --> 00:20:13,490
Right.

290
00:20:13,500 --> 00:20:18,800
You can see now the height is much larger or even just hard code the value of totally out.

291
00:20:18,810 --> 00:20:21,670
So for example you can say a 50 DP.

292
00:20:21,910 --> 00:20:22,400
OK.

293
00:20:22,560 --> 00:20:25,830
So this DP is very important what is this DP.

294
00:20:26,010 --> 00:20:34,140
DP stands for density independent pixels which is the android way in order to specify that how your

295
00:20:34,140 --> 00:20:41,160
widget is going to look like in other in lots of different Android devices because lots of different

296
00:20:41,160 --> 00:20:47,310
Android devices comes with different resolutions and qualities and screen qualities actually.

297
00:20:47,430 --> 00:20:58,260
So this DP is used for specifying how quality How are these tapes view is going to be shown on on a

298
00:20:58,260 --> 00:21:01,080
specific device with a specific quality.

299
00:21:01,080 --> 00:21:03,730
So let me show you a posting a stack overflow.

300
00:21:03,750 --> 00:21:10,890
Here you can see it says from the average level of documentation pixels corresponds to actual pixels

301
00:21:10,890 --> 00:21:15,010
on the screen in inches based on the physical size of the screen.

302
00:21:15,030 --> 00:21:18,420
We have a millimeter of space and the physical side of the screen.

303
00:21:18,420 --> 00:21:20,400
We have P-T points.

304
00:21:20,850 --> 00:21:28,170
And here we have the p or the IP density independent pixels and abstracts unit that is based on the

305
00:21:28,170 --> 00:21:30,670
physical density of the screen.

306
00:21:30,720 --> 00:21:32,290
These units are relative to.

307
00:21:32,310 --> 00:21:34,870
One hundred and sixty DP screen.

308
00:21:34,980 --> 00:21:44,820
So one DP is one pixel on a 160 DP sclayn the ratio of DP to pixel will change with screen density.

309
00:21:44,820 --> 00:21:53,850
So this is very important but not necessarily in direct proportion not the compiler accepts both the

310
00:21:53,850 --> 00:22:02,880
IP and DP Do DP is more consistent with Espey so espie is also scale independent because we use SPF

311
00:22:02,910 --> 00:22:09,690
if you want to actually specify the text size of a specific text view.

312
00:22:09,840 --> 00:22:15,720
So scale independently so this is like the DP you need but it is also scaled by the users font size

313
00:22:15,870 --> 00:22:16,790
so users.

314
00:22:16,800 --> 00:22:20,830
So we use this as p for the font size preference.

315
00:22:20,910 --> 00:22:27,060
It is recommended you use this unit when you're specifying font sizes so they will be adjusted for both

316
00:22:27,060 --> 00:22:29,870
the screen density and the user's preference.

317
00:22:30,100 --> 00:22:30,630
OK.

318
00:22:31,530 --> 00:22:38,010
Add on other articles that I want you to read now is supporting multiple screens.

319
00:22:38,010 --> 00:22:39,420
So let me show you that article.

320
00:22:39,420 --> 00:22:44,610
So here it is the article in Google you can just search for these these keywords here supporting multiple

321
00:22:44,610 --> 00:22:45,040
screens.

322
00:22:45,060 --> 00:22:49,560
And then you will see a link that will guide you to this page or you can just directly enter this you

323
00:22:49,560 --> 00:22:56,250
are inside the search bar of your web browser developer and Twitter.com slash guide slash practices

324
00:22:56,520 --> 00:22:58,610
slash screens Otherland supporter.

325
00:22:58,800 --> 00:23:01,920
Well I just want you to just read this documentation.

326
00:23:02,070 --> 00:23:04,380
We're going to learn more about this later.

327
00:23:04,380 --> 00:23:09,600
But for now I just want to read this document is this documentation in order to introduce yourself to

328
00:23:10,260 --> 00:23:14,780
how Android actually handles multiple screens.

329
00:23:15,000 --> 00:23:15,610
OK.

330
00:23:15,840 --> 00:23:18,170
So let's go back to android studio.

331
00:23:18,270 --> 00:23:21,780
So here it is R-TX view on the right hand side we can see these attributes.

332
00:23:21,790 --> 00:23:29,060
For example we can change the text or text you can see hybrid right and that person until Genner keyboard

333
00:23:29,790 --> 00:23:32,630
and here are inside this pallet section.

334
00:23:32,720 --> 00:23:35,910
We have some other components inside these ticks.

335
00:23:36,020 --> 00:23:40,010
We have plain text or plain text is different from the text view.

336
00:23:40,010 --> 00:23:45,680
So if I select this plain text and just added into a layout you can see that it is actually an edit

337
00:23:45,680 --> 00:23:48,400
text instead of a text view.

338
00:23:48,560 --> 00:23:55,830
So and a text is actually a container for text we can enter a text inside is editor.

339
00:23:56,170 --> 00:23:58,670
And at the right hand side you can see these attributes.

340
00:23:58,670 --> 00:24:02,260
So for example we have the hint attribute here right.

341
00:24:02,300 --> 00:24:10,500
We can say enter enter a name and then dot dot dot and then put it on until you can your keyboard and

342
00:24:10,710 --> 00:24:16,260
just delete the text value of this text attribute and the person and it on your keyboard.

343
00:24:16,260 --> 00:24:18,350
So here you can see it says enter a name.

344
00:24:18,480 --> 00:24:24,360
So in this case we can enter the value let me run the app let me show you the emulator.

345
00:24:24,360 --> 00:24:26,750
So here it is our app running on the simulator.

346
00:24:26,880 --> 00:24:31,890
And here if I click on it it takes you can see that I can just type the value inside is added text.

347
00:24:31,980 --> 00:24:32,360
Right.

348
00:24:32,460 --> 00:24:40,230
So for example it says Enter the name so we can't just say Mac book right or we can say for example

349
00:24:40,230 --> 00:24:40,800
Galaxie

350
00:24:43,750 --> 00:24:47,990
So here this is how it takes work in Android.

351
00:24:48,100 --> 00:24:53,470
We have some other Edhi texts we have to pass for added text which you can actually to enter a password.

352
00:24:53,470 --> 00:24:59,110
So let me just drag a password it takes here and here let's run the app.

353
00:24:59,110 --> 00:25:01,190
So here we can see our text.

354
00:25:01,360 --> 00:25:06,970
And as you can see whatever I put here is shown as actually That's right.

355
00:25:07,000 --> 00:25:13,000
So this is how we can actually use it as a passport that it takes and we have lots of other editrix

356
00:25:13,300 --> 00:25:14,850
we have passed for numeric.

357
00:25:14,860 --> 00:25:17,680
You can actually only enter numeric values.

358
00:25:17,680 --> 00:25:23,430
We have it we have email forne postal address and lots of other components.

359
00:25:23,680 --> 00:25:25,900
We have to lay out the layouts.

360
00:25:25,900 --> 00:25:31,120
We have a lot of other layouts we have the constraint lay out grittily out of frame lay out linearly

361
00:25:31,120 --> 00:25:32,990
out linearly as vertical.

362
00:25:33,010 --> 00:25:37,190
We're going to learn all about these layouts here in this course.

363
00:25:37,400 --> 00:25:41,070
We have the containers we have the contentless collection containers.

364
00:25:41,230 --> 00:25:47,510
We have the radio group list view view expandable view scroll view horizontally scroll view.

365
00:25:47,680 --> 00:25:51,160
So this one the default scroll view is actually the vertical scroll.

366
00:25:51,390 --> 00:25:55,710
We have the tab host view search view and here we have these images.

367
00:25:55,750 --> 00:25:58,560
Image button image view video view.

368
00:25:58,690 --> 00:26:02,400
OK we're going to use these components later in this course.

369
00:26:02,680 --> 00:26:07,580
And here what is that image view is actually a container for an image or this image button.

370
00:26:07,750 --> 00:26:08,010
Right.

371
00:26:08,050 --> 00:26:09,520
Or this video you.

372
00:26:09,730 --> 00:26:11,200
These are just containers.

373
00:26:11,230 --> 00:26:15,980
We have the date we have transitions at.

374
00:26:16,280 --> 00:26:22,560
So you can see some of these components inside these advanced google and view map view design.

375
00:26:23,000 --> 00:26:30,350
So here we have cordoned literally out of partly out tabouli out faluting action button and compact

376
00:26:30,650 --> 00:26:31,250
here.

377
00:26:31,340 --> 00:26:38,690
So our compact is actually related to how our application is going to be compatible with the older version

378
00:26:39,110 --> 00:26:40,950
of Android operating system.

379
00:26:41,030 --> 00:26:45,190
So we use this library a lot in this course and that's it.

380
00:26:45,200 --> 00:26:50,620
It's enough for the story in the next story or we are going to learn more about layouts in Android.

381
00:26:50,750 --> 00:26:55,700
So if you have any questions please post a discussion in the course and then I'll do my best to answer

382
00:26:55,730 --> 00:26:56,950
all of your questions.

383
00:26:56,960 --> 00:26:58,380
Thank you very much for watching.

384
00:26:58,520 --> 00:27:00,710
And I look forward to seeing you in the next tutorial.

