1
00:00:00,390 --> 00:00:07,290
So now let's actually add the resources that you downloaded from the previous lecture to our project.

2
00:00:07,290 --> 00:00:12,960
So now let's actually minimize this and reached the idea here and now as you can see here we have free

3
00:00:12,960 --> 00:00:16,000
phones that we're going to use in our project.

4
00:00:16,020 --> 00:00:16,230
OK.

5
00:00:16,230 --> 00:00:20,520
You can actually download these fonts from the internet or other phones.

6
00:00:20,700 --> 00:00:27,330
And now let me show you a Web site that you can actually download the phones from the Internet as you

7
00:00:27,330 --> 00:00:29,800
can see here are from this Web site here.

8
00:00:29,820 --> 00:00:32,400
As you can see you can actually download these phones.

9
00:00:32,400 --> 00:00:35,200
OK there are lots of and lots of fonts here.

10
00:00:35,500 --> 00:00:38,660
And you can actually download them and use them in your own projects.

11
00:00:38,700 --> 00:00:39,270
OK.

12
00:00:39,510 --> 00:00:45,240
So now as you can see these are the fonts that you're are going to use inside our project.

13
00:00:45,240 --> 00:00:48,200
And as you can see we have two folders.

14
00:00:48,270 --> 00:00:49,870
The first one is tame.

15
00:00:49,910 --> 00:00:51,270
Underline animals.

16
00:00:51,300 --> 00:00:51,770
OK.

17
00:00:51,990 --> 00:00:58,770
So I actually provided you with art with actually an archive that zip file in the previous lecture which

18
00:00:58,770 --> 00:01:03,210
you can actually download and you can actually unzipped it and you know and then you can actually access

19
00:01:03,210 --> 00:01:04,400
these files.

20
00:01:04,620 --> 00:01:10,350
And as you can see here the first for that folder is came under underline animals.

21
00:01:10,350 --> 00:01:14,670
So this is really more important that the name must be like this.

22
00:01:14,670 --> 00:01:17,880
And the second for that is voyde underlying animals.

23
00:01:17,910 --> 00:01:23,850
So as you can see here if we actually open this tame underline animals here as you can see we have these

24
00:01:23,910 --> 00:01:25,910
animals inside this folder.

25
00:01:25,950 --> 00:01:28,840
So let's look at the name of these animals here.

26
00:01:28,950 --> 00:01:33,280
Tame underlaid anemones dash Pinguin that PND.

27
00:01:33,600 --> 00:01:34,170
Right.

28
00:01:34,170 --> 00:01:35,850
So I look at the name first.

29
00:01:35,850 --> 00:01:41,190
I actually said that this is actually a tame anymore tame on the line Namath's and when I began to actually

30
00:01:41,190 --> 00:01:47,580
separate this name with the real name of this animal I actually used a dash right.

31
00:01:47,620 --> 00:01:55,020
So I actually named all of these images myself in order to be like this so that when I actually want

32
00:01:55,020 --> 00:02:00,420
to actually use them in our inside our project and I've been able to interact with these images inside

33
00:02:00,420 --> 00:02:06,870
my project and from my job code I can actually access these images and I can actually actually interact

34
00:02:06,870 --> 00:02:07,730
with these images.

35
00:02:07,740 --> 00:02:11,410
This is really important that you actually named them the right way.

36
00:02:11,460 --> 00:02:17,130
OK so because I want to interact with interact with these images with these image names I actually name

37
00:02:17,160 --> 00:02:18,080
them in this way.

38
00:02:18,180 --> 00:02:23,120
So you should also name them in this way if you want to actually use other images other images.

39
00:02:23,340 --> 00:02:29,220
But for now let's actually recommend that you actually use these default images and then when you get

40
00:02:29,220 --> 00:02:34,940
the idea how to actually on how to create a quick application you can actually create your own.

41
00:02:34,980 --> 00:02:40,760
Just for now just use these images and then you will understand how this works.

42
00:02:40,770 --> 00:02:42,720
So let's look at this name came on the line.

43
00:02:42,720 --> 00:02:45,400
Animals dash Pinguin that P and G.

44
00:02:45,420 --> 00:02:51,300
So as you can see here we have another image came under like animals so that you can see here I actually

45
00:02:51,300 --> 00:02:55,710
separated this tape and these animals by using up and underline.

46
00:02:55,890 --> 00:03:03,480
And then I actually separated these tame underlying animals with the real name of this image by using

47
00:03:03,720 --> 00:03:05,710
our dash as you can see here.

48
00:03:05,730 --> 00:03:06,930
Right.

49
00:03:07,020 --> 00:03:14,790
And here we have tame underlain animals Dasch peacock and other images and we have also this void underlying

50
00:03:14,820 --> 00:03:16,680
animals as you can see here.

51
00:03:16,680 --> 00:03:24,630
So as can see here we have other images here but here we're just using some of these images right.

52
00:03:24,870 --> 00:03:28,420
For example wild animals dasht tiger.

53
00:03:28,720 --> 00:03:33,430
While under like animals snake and all other images we can actually use.

54
00:03:33,570 --> 00:03:38,300
All the other images that I provided here as you can see but I didn't name them the right way.

55
00:03:38,310 --> 00:03:44,490
So you can actually change the name of these images as you can see and you need to rename these images

56
00:03:44,520 --> 00:03:45,840
if you want to use them.

57
00:03:46,050 --> 00:03:50,210
But as you can see these are the images that they actually changed the name of them.

58
00:03:50,370 --> 00:03:51,140
Right.

59
00:03:51,200 --> 00:03:55,010
So so that they can actually use them inside my own project.

60
00:03:55,020 --> 00:04:03,280
So now let's see how we can actually put these resources these formats and these images inside our project.

61
00:04:03,330 --> 00:04:05,710
So an atlas actually opened the Android studio.

62
00:04:05,850 --> 00:04:12,210
So as you can see here this is the android studio so now let's open the project structure so you tool

63
00:04:12,210 --> 00:04:15,170
windows and then click on Project.

64
00:04:15,180 --> 00:04:17,880
And as you can see here this is our project structure.

65
00:04:18,060 --> 00:04:24,000
So now let's actually click on this arrest folder here as you can see we have the rest folder here.

66
00:04:24,000 --> 00:04:25,880
Right click on it new.

67
00:04:26,220 --> 00:04:29,130
And then here as you can see we have this folder option here.

68
00:04:29,130 --> 00:04:29,820
Right.

69
00:04:29,880 --> 00:04:36,450
And then he had inside this folder option as you can see choose these assets folder.

70
00:04:36,450 --> 00:04:39,030
And then just click and finish as you can see here.

71
00:04:39,030 --> 00:04:46,480
Now we have an assets folder as you can see here inside our app directory right inside Abdulbaset if

72
00:04:46,560 --> 00:04:49,050
we have these assets folder.

73
00:04:49,050 --> 00:04:56,670
So now let's click on these assets for new and then click on directory and just name the directory as

74
00:04:56,730 --> 00:05:00,420
fonts right and then click on OK.

75
00:05:00,960 --> 00:05:05,870
So as you can see here now inside these assets folders we have this phone directory.

76
00:05:06,320 --> 00:05:12,690
And now let's actually minimize this as a studio and let's actually copy these fonts here just right

77
00:05:12,690 --> 00:05:17,280
click on them and then click on copy free items or if you are if you you're actually using a Windows

78
00:05:17,280 --> 00:05:22,310
machine you can actually just select them and just right click on the app and then select copy.

79
00:05:22,680 --> 00:05:25,940
And now this actually open the Android studio again.

80
00:05:25,950 --> 00:05:28,080
So now this is my android studio.

81
00:05:28,110 --> 00:05:34,710
And I just need to right click on these fonts directory here and then click on paste analogy I say here

82
00:05:34,800 --> 00:05:36,240
I just need to click on OK.

83
00:05:36,510 --> 00:05:43,100
So as you can see here now we have these free fonts inside our phone strictly inside these assets folder.

84
00:05:43,380 --> 00:05:49,860
And now it's time to actually put these images inside our project so just select him right click on

85
00:05:49,860 --> 00:05:52,030
them and then click on copy.

86
00:05:52,590 --> 00:05:55,000
And let's actually open the Android studio here.

87
00:05:55,020 --> 00:05:57,670
So this is our Android studio.

88
00:05:57,750 --> 00:06:03,450
So let's actually select his assets folder right click on it and then click on paste and then click

89
00:06:03,450 --> 00:06:03,610
on.

90
00:06:03,630 --> 00:06:04,370
OK.

91
00:06:04,800 --> 00:06:11,760
So as you can see here now we have these directories inside our project we have these folders inside

92
00:06:11,790 --> 00:06:13,000
our assets folder.

93
00:06:13,170 --> 00:06:19,890
And as you can see if we actually open these folders we can see that we have these images inside our

94
00:06:19,890 --> 00:06:21,250
project right.

95
00:06:21,270 --> 00:06:23,430
We have this wild animals.

96
00:06:23,430 --> 00:06:24,900
We have these tame animals.

97
00:06:25,110 --> 00:06:29,790
But now this because as you can see here for example inside these tame animals we have these images

98
00:06:30,060 --> 00:06:31,590
and everything is great.

99
00:06:31,590 --> 00:06:32,470
Everything is good.

100
00:06:32,670 --> 00:06:37,470
But inside this wild animals directed as you can see here we have some of these images that we don't

101
00:06:37,470 --> 00:06:41,170
want to use inside our project because we didn't name them the right way.

102
00:06:41,190 --> 00:06:48,810
So let's actually delete the images that you want that are not named the rightway So let's for example

103
00:06:48,810 --> 00:06:52,110
this image this image and this image as you can see here.

104
00:06:52,560 --> 00:06:55,800
These are for these first four images.

105
00:06:55,800 --> 00:07:00,880
I just need to select him and then press and delete it in order to delete these images and then can.

106
00:07:00,900 --> 00:07:01,830
OK.

107
00:07:02,130 --> 00:07:05,260
As he has here now those images are now deleted.

108
00:07:05,280 --> 00:07:05,880
Right.

109
00:07:05,970 --> 00:07:11,310
So here I just wanted to show you how you can actually delete an image from your resources.

110
00:07:11,700 --> 00:07:15,710
And here as you can see now all of these images are made out there right away.

111
00:07:15,720 --> 00:07:24,330
So for example did under live animals dash beer void on the line animals dash crocodile wild underline

112
00:07:24,330 --> 00:07:31,440
animals dashed dark wild underline animals dash Eagle wild underline animals.

113
00:07:31,540 --> 00:07:32,320
Elephants right.

114
00:07:32,340 --> 00:07:38,550
This is the right way to name these images inside our project in order to actually create an animal

115
00:07:38,550 --> 00:07:47,630
Ku's application wild underline any mustache faux wild underlying animal stash leopard wild underline

116
00:07:47,670 --> 00:07:56,010
animals that live in the wild under like animals dash mouse voyde under light animals dash pink underline

117
00:07:56,010 --> 00:08:06,560
punter white underline and mustache shark voyde underline animals dasht snake and void Odelein any mustached

118
00:08:06,610 --> 00:08:07,070
Tiger.

119
00:08:07,080 --> 00:08:13,100
So these are the images that you want to use inside our crease and here as you can see we have these

120
00:08:13,100 --> 00:08:20,810
tent animals tame under like animals and tame Underland animals dashboard tame on the animals dash chat

121
00:08:21,620 --> 00:08:30,160
tame underline animal stats dash Dalfin tame underline animals dash fish tame ondel animals that flappy

122
00:08:30,380 --> 00:08:38,390
underlined parrot right tame Underland animals dash goat tame Underland animals horse tame Underland

123
00:08:38,390 --> 00:08:46,250
animals Peacock tame Underland animals dash Pinguin tame on the line animals dash rabbit and tame underlined

124
00:08:46,280 --> 00:08:47,540
animals that sheep.

125
00:08:47,720 --> 00:08:50,350
So we're going to use these images in our project.

126
00:08:50,390 --> 00:08:58,790
So now that's actually just run our project and see that our differences and here I just need to wait

127
00:08:58,850 --> 00:09:03,270
and select this nexus 6 AP I-24 and I can.

128
00:09:03,290 --> 00:09:03,800
OK.

129
00:09:04,730 --> 00:09:10,490
So as you can see here our application is running on this emulator and these are the buttons that you

130
00:09:10,490 --> 00:09:12,800
want to use inside our project.

131
00:09:12,800 --> 00:09:14,040
And this is the text.

132
00:09:14,060 --> 00:09:20,410
This is animal for example number one of number and what we are going to use these arguments later.

133
00:09:20,450 --> 00:09:22,700
And you'll see how to use this format.

134
00:09:23,180 --> 00:09:25,270
And here at the top we have the settings.

135
00:09:25,370 --> 00:09:31,210
If I select them now as you can see here we cannot actually translate to their settings activity.

136
00:09:31,340 --> 00:09:36,410
We actually created the settings activity but we cannot actually move to that activity here.

137
00:09:36,500 --> 00:09:40,780
For now we just need to actually provide the job codes for that for.

138
00:09:40,780 --> 00:09:48,190
So now let's actually go inside our Android studio and here let's actually go inside this job folder.

139
00:09:48,530 --> 00:09:51,670
And as you can see here the first folder is this one.

140
00:09:51,670 --> 00:09:56,460
This is the name of the package come that example that monitors the solder that animal quits.

141
00:09:56,510 --> 00:10:01,120
So an altitude of industry actually as you can see here we have two vials.

142
00:10:01,190 --> 00:10:03,320
The first one is the main activity.

143
00:10:03,350 --> 00:10:08,780
Now if I were to double click on it as you can see we have this wide and these are the quotes that are

144
00:10:08,780 --> 00:10:09,800
in this file.

145
00:10:10,320 --> 00:10:15,260
And now if we actually open the project structure structure again as you can see we have also this main

146
00:10:15,260 --> 00:10:21,290
activity fragment right which is going to actually load the fragment on the line made that example on

147
00:10:21,350 --> 00:10:22,730
that main activity here.

148
00:10:22,790 --> 00:10:28,730
As you can see so because here in this in these tutorials I want to show you how to use fragments in

149
00:10:28,730 --> 00:10:29,530
Android.

150
00:10:29,540 --> 00:10:33,710
This is really important that we actually that this file does exist.

151
00:10:33,710 --> 00:10:39,500
And as you can see main activity fragment extends from the fragment here as you can see.

152
00:10:39,770 --> 00:10:46,070
And if you have this construction the main activity fragment and we have also this Smurfette that we

153
00:10:46,070 --> 00:10:47,960
actually that you are right in here.

154
00:10:47,990 --> 00:10:54,800
Uncreate view and as you can see here it is actually returning inflator that inflates or that lay out

155
00:10:54,860 --> 00:10:57,200
that fragment on the line main.

156
00:10:57,200 --> 00:11:01,500
So this is going to be the example file that we are going to load inside our main activity.

157
00:11:01,500 --> 00:11:07,670
So now let me let me actually show you opened the back project structure so you tool windows and then

158
00:11:07,670 --> 00:11:14,260
project and here inside this race folder inside this little folder we have this activity underlayment

159
00:11:14,260 --> 00:11:18,010
at example we have this content underlined minute example.

160
00:11:18,200 --> 00:11:21,600
And if you have also this fragment on the alignment that is similar.

161
00:11:21,620 --> 00:11:25,940
So here as you can see it says Return inflator that inflate.

162
00:11:25,940 --> 00:11:30,860
So yet we want to actually inflate this flagmen underlayment and examine here as you can see we actually

163
00:11:30,860 --> 00:11:34,240
designed the application in this file.

164
00:11:34,530 --> 00:11:36,580
And now as you can see here we have a problem.

165
00:11:36,590 --> 00:11:42,020
And I just click on this Kilcash and now as you can see when I actually clicked on the clear cache as

166
00:11:42,020 --> 00:11:44,210
you can see here the arrow is now gone.

167
00:11:44,210 --> 00:11:50,210
So this is our fragment underlying that example and this is the file that we actually designed for our

168
00:11:50,210 --> 00:11:50,810
application.

169
00:11:50,810 --> 00:11:56,450
So this is really important that because this content on the minute example here as you can see is actually

170
00:11:56,690 --> 00:11:58,950
just using this fragment here.

171
00:11:59,000 --> 00:12:04,610
Here we want to load this fragment underline Minet example on this content underline minute example

172
00:12:04,640 --> 00:12:08,110
and that's why you can see inside this main activity fragment here.

173
00:12:08,150 --> 00:12:09,670
Here we are inflating this file.

174
00:12:09,710 --> 00:12:15,620
Art that lays out that flight went under alignment here and here for the argument to be we need to specify

175
00:12:15,620 --> 00:12:19,310
the container as you can see the container is of type group right.

176
00:12:19,340 --> 00:12:24,640
So the container is this content underline I mean they smell this content underline when it is.

177
00:12:24,650 --> 00:12:27,630
And here is going to be the container for that flight.

178
00:12:27,680 --> 00:12:30,220
As you can see we have this right amount here inside this content.

179
00:12:30,240 --> 00:12:32,180
Under the last minute they said and here at the top.

180
00:12:32,180 --> 00:12:35,540
If you click on this take step here you will see these these lines of code.

181
00:12:35,660 --> 00:12:36,120
Right.

182
00:12:36,290 --> 00:12:39,850
And you can see that you are using these fragment underlayment at SML.

183
00:12:40,040 --> 00:12:46,580
So that's why you can see inside is for the main activity like metal Jobab we're actually inflating

184
00:12:46,580 --> 00:12:50,250
this file fragment underlying main on this container.

185
00:12:50,390 --> 00:12:56,180
And as you can see here here it says for us for the third argument we said LaFalce And this argument

186
00:12:56,180 --> 00:13:01,060
is going to specify that whether we want to actually attach this fragment underline minute exemption

187
00:13:01,070 --> 00:13:07,130
to the container or not here because already we actually attached this fragment under the limited example

188
00:13:07,340 --> 00:13:13,490
to the container that is known to is to actually put the value to here because we already actually put

189
00:13:13,490 --> 00:13:19,460
this fragment under load minute segment here on this container inside this container so we don't need

190
00:13:19,460 --> 00:13:21,800
to use neutral here.

191
00:13:22,040 --> 00:13:27,470
And that's the job of this argument as against it is going to specify whether we want to attach our

192
00:13:27,470 --> 00:13:30,240
fragment to or contain it or not.

193
00:13:30,620 --> 00:13:33,790
And we are saying de-value false because we already did that.

194
00:13:33,980 --> 00:13:40,890
We are ready to put a under the last minute segment inside our container which is actually the contents

195
00:13:40,970 --> 00:13:42,950
underlying minute x amount.

196
00:13:43,070 --> 00:13:44,580
So hopefully that makes sense.

197
00:13:44,600 --> 00:13:51,700
And now this actually open our project structure again tool windows project and it's actually to go

198
00:13:51,690 --> 00:13:53,710
inside this main activity the java file here.

199
00:13:53,850 --> 00:13:56,310
Let's actually double click on this tab here.

200
00:13:56,310 --> 00:14:01,620
Main activity that Java in order to make it easier Eddy or Vider And now we are going to put some lines

201
00:14:01,620 --> 00:14:02,190
of code here.

202
00:14:02,190 --> 00:14:06,350
Now it's time to put the logic of the application here.

203
00:14:06,660 --> 00:14:07,500
So now.

