1
00:00:00,290 --> 00:00:06,190
Hi everyone in this theater are really really going to go ahead and create another Android application.

2
00:00:06,210 --> 00:00:07,300
So just click on this.

3
00:00:07,350 --> 00:00:13,740
Start in your Android studio project here and here for the name of our application just type in here

4
00:00:13,770 --> 00:00:20,630
app 51 and here are click on next and here for the minimum STK choose.

5
00:00:20,670 --> 00:00:24,040
AP is 16 Android 4.1 jelly bean.

6
00:00:24,150 --> 00:00:31,370
And then click on next and here choose empty activity next and here click on finish.

7
00:00:31,530 --> 00:00:35,340
So as you can see here now our project is actually created.

8
00:00:35,340 --> 00:00:37,200
So now let's actually double click on this.

9
00:00:37,200 --> 00:00:43,440
This folder here and then double click on the layout folder and then double click on this activity underline

10
00:00:43,480 --> 00:00:45,330
minute example here.

11
00:00:45,360 --> 00:00:48,930
So now I want to design the user interface of our application.

12
00:00:49,110 --> 00:00:54,510
So just select the hello world takes you here and then Fri-Sun delete key on your keyboard.

13
00:00:54,720 --> 00:00:59,610
So that is actually double click on this activity Underland minute example in order to make this design

14
00:00:59,640 --> 00:01:00,670
area wider.

15
00:01:01,020 --> 00:01:08,680
And now let's actually try to linearly out vertical at the center of this relatively out here and then

16
00:01:08,730 --> 00:01:11,850
let's actually find this a vertical scroll.

17
00:01:11,850 --> 00:01:13,990
Your insight is container's for that.

18
00:01:14,010 --> 00:01:21,580
So just select it and put it at the center of this linearly out vertical and then let's actually again

19
00:01:21,680 --> 00:01:26,660
right and linearly out vertical as you can see here inside this layouts folder.

20
00:01:26,780 --> 00:01:31,990
Select is linearly at Westcott and put it inside this scroll you here.

21
00:01:32,040 --> 00:01:32,590
OK.

22
00:01:32,700 --> 00:01:34,960
So just put it at the center here.

23
00:01:34,980 --> 00:01:35,730
OK.

24
00:01:36,130 --> 00:01:41,970
And now as you can see this linearly vertical is actually inside the scroll you here.

25
00:01:42,150 --> 00:01:42,850
OK.

26
00:01:43,230 --> 00:01:50,340
And now let's actually tried some text views inside this linearly out vertical.

27
00:01:50,370 --> 00:01:55,890
So Enceladus if it is for that as you can see here I have these takes two views here.

28
00:01:55,920 --> 00:02:03,180
So just select these large takes here and put it inside this linearly out vertical and here and here

29
00:02:03,210 --> 00:02:08,940
as you can see I have these properties that are related to this large text view.

30
00:02:09,030 --> 00:02:17,340
And here for the lay of gravity just select center horizontal and now as you can see our text view is

31
00:02:17,340 --> 00:02:24,960
actually centered horizontally inside this linearly or TerraCycle and for play out which is kind of

32
00:02:24,960 --> 00:02:28,980
at the end the value match pallete and here.

33
00:02:28,990 --> 00:02:35,950
Let's actually find the grip the gravity attribute that is related to the stakes because I want to center.

34
00:02:35,970 --> 00:02:38,830
This takes Enceladus takes you here.

35
00:02:38,950 --> 00:02:41,550
So I can't just find the gravity attribute here.

36
00:02:41,560 --> 00:02:47,320
So as you can see this is the this is the gravity attribute to open this great gravity attribute here.

37
00:02:47,320 --> 00:02:50,510
And just check this sent her a checkbox here.

38
00:02:50,680 --> 00:02:57,310
So now as you can see it is the taste of this takes is actually centered inside this takes you OK by

39
00:02:57,310 --> 00:03:00,210
actually manipulating this gravity attribute.

40
00:03:00,210 --> 00:03:00,910
OK.

41
00:03:01,300 --> 00:03:02,960
So hopefully that makes sense.

42
00:03:03,190 --> 00:03:07,930
And now let's actually double click and this takes here and it takes just typing here.

43
00:03:07,930 --> 00:03:13,230
This is text number one.

44
00:03:13,330 --> 00:03:17,140
And for the idea just type in here it takes the number one

45
00:03:20,130 --> 00:03:23,780
or the text number one.

46
00:03:24,550 --> 00:03:25,140
OK.

47
00:03:26,930 --> 00:03:34,040
And then person Enter key on your keyboard and then let's actually try and order a text view into this

48
00:03:34,370 --> 00:03:35,860
linearly Ellsworthy call.

49
00:03:35,870 --> 00:03:42,940
So just select this large text view here and put it inside this linearly or vertical again for the lay

50
00:03:42,940 --> 00:03:47,380
out gravity assign the values center horizontal as you can see here.

51
00:03:47,690 --> 00:03:54,760
And for the lay out which is the value match Pallant and now the second we find the gravity attribute

52
00:03:55,010 --> 00:03:57,220
as you can see here this is the gravity attribute.

53
00:03:57,410 --> 00:04:03,680
And here check the center checkbox here and now as you can see this the text of this text view is actually

54
00:04:03,680 --> 00:04:04,820
centered inside.

55
00:04:04,820 --> 00:04:08,400
This takes you and double clicking on these takes here.

56
00:04:08,510 --> 00:04:18,580
So for the text just typing here this is text number 2 and for the ID just type in here it takes the

57
00:04:19,000 --> 00:04:21,730
text number two.

58
00:04:22,510 --> 00:04:22,960
OK.

59
00:04:23,080 --> 00:04:25,760
And then press on Enter key on your keyboard.

60
00:04:26,020 --> 00:04:31,450
And again let's actually drag another takes you into this linearly outway article so just select is

61
00:04:31,450 --> 00:04:38,020
large takes you inside these widgets folder and put it inside this linearly at vertical as you can see

62
00:04:38,020 --> 00:04:38,310
here.

63
00:04:38,320 --> 00:04:44,610
Inside this componentry section here and here again let's actually assign the values center horizontal

64
00:04:44,620 --> 00:04:47,030
for the lay of gravity of this text view.

65
00:04:47,080 --> 00:04:49,740
So here this is the center hole is on top.

66
00:04:49,750 --> 00:04:57,970
I just need to select it and faultily out we assign the value match Pallant and here are for the gravity

67
00:04:58,060 --> 00:04:59,010
attribute.

68
00:04:59,110 --> 00:05:03,900
Check this center check checkbox here and then double click and this takes you here.

69
00:05:04,180 --> 00:05:06,250
And for that takes just a minute here.

70
00:05:06,250 --> 00:05:22,020
This is this is text number free and for the ideas they've been here use the text number three OK and

71
00:05:22,020 --> 00:05:24,320
then press Enter key on your keyboard.

72
00:05:24,660 --> 00:05:30,150
So now let's ask you to go inside our main activity the java file here and now I want to actually declare

73
00:05:30,480 --> 00:05:33,310
my user interface components here.

74
00:05:33,570 --> 00:05:36,720
Some objects of type using interface components.

75
00:05:36,720 --> 00:05:41,490
So as you can see here in this design area I have these takes views.

76
00:05:41,490 --> 00:05:43,340
So these are the user interface components.

77
00:05:43,350 --> 00:05:49,140
So inside our main activity that of a file you want to actually create objects of type text view in

78
00:05:49,140 --> 00:05:53,180
order to interact with these user interface components.

79
00:05:53,190 --> 00:06:03,840
So here I can't just declare a text view object takes to view the text number one semicolon text view

80
00:06:04,360 --> 00:06:08,720
takes the text number two.

81
00:06:08,730 --> 00:06:09,550
OK.

82
00:06:09,960 --> 00:06:19,770
And of the first object is going to be again after it takes you to fix the text number free and then

83
00:06:19,770 --> 00:06:22,370
put a semicolon at the end of your statement.

84
00:06:22,380 --> 00:06:29,460
So now inside our uncreate method I need to actually instantiate these objects that I actually declared

85
00:06:29,520 --> 00:06:31,540
inside our main activity class.

86
00:06:31,560 --> 00:06:36,540
So as you can see here here we are just declaring these objects we're not creating these objects.

87
00:06:36,720 --> 00:06:41,950
And here and if we actually refer to these objects anywhere in my code my eyes my eyes.

88
00:06:42,060 --> 00:06:47,880
My application is going to crash because these objects are not instantiated yet.

89
00:06:47,990 --> 00:06:53,700
OK so here I can just type anti-X the text number one assignment operator.

90
00:06:53,850 --> 00:07:00,140
And here I need to actually cast this object where it takes you object fly into view by id r that ID

91
00:07:00,210 --> 00:07:09,650
that takes the x number one semi-colon the X the takes number two assignment operator takes view find

92
00:07:09,660 --> 00:07:19,350
view by the artist Id that takes the text number two semi-colon takes the takes number of the assignment

93
00:07:19,350 --> 00:07:27,630
operator and here I need to cast this object we takes few object find view ID are that ID that takes

94
00:07:27,630 --> 00:07:32,750
the takes number feet and then put a semi-colon at the end of your statement.

95
00:07:32,760 --> 00:07:38,490
So now I want to actually create an assets folder in my project structure.

96
00:07:38,550 --> 00:07:43,830
So just click on this view here at the top tool windows and then click on project here.

97
00:07:44,310 --> 00:07:47,550
And as you can see here for this section at the top here choose Android.

98
00:07:47,550 --> 00:07:50,500
OK this is important and then select this app.

99
00:07:50,500 --> 00:07:53,330
Here this app folder right click on it.

100
00:07:53,610 --> 00:08:00,840
And then here you choose new and then choose folder and then click on these assets folder.

101
00:08:00,840 --> 00:08:01,620
OK.

102
00:08:02,010 --> 00:08:03,960
And here just don't change anything.

103
00:08:03,990 --> 00:08:05,670
And then click on finish.

104
00:08:05,790 --> 00:08:11,700
So as you can see here I have these assets folder inside my app here and right clicked on these assets

105
00:08:11,760 --> 00:08:13,120
folder new.

106
00:08:13,290 --> 00:08:17,370
And then click on Android resource directory for the name of my directory.

107
00:08:17,370 --> 00:08:20,960
I can't just type in menu underline mean.

108
00:08:21,350 --> 00:08:21,850
OK.

109
00:08:22,020 --> 00:08:29,910
And for the resource type just to just choose this menu here as you can see here and again change this

110
00:08:29,950 --> 00:08:33,560
name to just a directory name too many are made.

111
00:08:34,590 --> 00:08:36,140
And then click on OK.

112
00:08:36,360 --> 00:08:44,100
And right click on these assets folder here and then Neo and then click on directory and then for the

113
00:08:44,100 --> 00:08:48,600
name of our directives just type in here fonts and then click on OK.

114
00:08:48,810 --> 00:08:53,200
So as you can see here I have this Faunce directory inside these assets folder.

115
00:08:53,250 --> 00:08:57,850
So I have to actually put some fonts inside this Faunce fold fonts directory.

116
00:08:57,860 --> 00:09:05,040
OK so now on my desktop I have some fonts and by the way if you want to actually download some fonts

117
00:09:05,070 --> 00:09:09,010
from the Internet on your web browser you can actually use these.

118
00:09:09,010 --> 00:09:10,760
Are you Arel in your search bar.

119
00:09:10,770 --> 00:09:18,930
W w w that one thousand and one free fonts that come here you can actually choose one format and then

120
00:09:18,930 --> 00:09:23,750
download it and then you get and then you can actually use that font in your projects.

121
00:09:23,830 --> 00:09:32,400
But now on my desktop as you can see here on my desk that I have these phones here I don't know I downloaded

122
00:09:32,400 --> 00:09:34,300
these phones from the Internet.

123
00:09:34,320 --> 00:09:38,030
The first one is actually the format of the first one is that ETF.

124
00:09:38,160 --> 00:09:42,960
The second one is that what you have and the first one is also that T.F..

125
00:09:43,080 --> 00:09:50,010
So I just need to select all of them and then right click on them and then click on copy free items

126
00:09:50,460 --> 00:09:55,200
and in my android studio I just need to select is Fornes directed here.

127
00:09:55,290 --> 00:09:59,590
Right click on it and then click on paste and then click on OK.

128
00:09:59,910 --> 00:10:05,540
So now as you can see here in my inside my phone straighted I have these phones here.

129
00:10:05,670 --> 00:10:09,920
So now let's actually run our project and see what happens.

