1
00:00:00,350 --> 00:00:06,350
Hire everyone in this tutorial we're going to go ahead and actually create an Android application.

2
00:00:06,600 --> 00:00:11,040
So we need to actually click on this start in your Android studio project.

3
00:00:11,040 --> 00:00:14,700
And here we just need to assign a name to our application name.

4
00:00:14,850 --> 00:00:22,650
So I just type in app 6 and you can actually specify the company domain and you can actually specify

5
00:00:22,650 --> 00:00:27,810
the package name and you can actually specify the project location here.

6
00:00:27,810 --> 00:00:28,580
OK.

7
00:00:28,680 --> 00:00:39,480
So click on next for the minimum STK choose a 16 Android 4.1 Jelly Bean OK and then click on next and

8
00:00:39,480 --> 00:00:42,010
here make sure to choose the Blache activity.

9
00:00:42,120 --> 00:00:45,730
Click next and here don't change anything.

10
00:00:45,780 --> 00:00:47,240
And then click on finish.

11
00:00:47,250 --> 00:00:51,030
So as you can see here it's going to actually configure and set up the project.

12
00:00:51,120 --> 00:00:51,630
OK.

13
00:00:51,720 --> 00:00:54,360
So as you can see here our project is created.

14
00:00:54,690 --> 00:01:01,260
And let's actually delete this hill over text you here and let's actually delete this a floating action

15
00:01:01,260 --> 00:01:02,190
button here.

16
00:01:02,250 --> 00:01:08,530
So doubleclick on this rest for the here and then double click on this layout folder and activity Underland

17
00:01:08,560 --> 00:01:13,140
made that example and then you can actually select this floating action button here and I can.

18
00:01:13,200 --> 00:01:18,710
And then you can actually delete these floating action button here without actually deleting those.

19
00:01:18,870 --> 00:01:22,670
Those actually lines of code in this text area here.

20
00:01:22,680 --> 00:01:23,430
OK.

21
00:01:23,490 --> 00:01:29,460
We can actually design our user interface interacting with the user interface.

22
00:01:29,460 --> 00:01:29,980
OK.

23
00:01:30,270 --> 00:01:36,480
You don't have to interact with that text area in order to design you or is it your user interface.

24
00:01:36,480 --> 00:01:37,110
OK.

25
00:01:37,320 --> 00:01:39,800
So let's go back inside the Design tab here.

26
00:01:40,020 --> 00:01:40,590
OK.

27
00:01:40,620 --> 00:01:46,200
Now that we actually deleted the fluting action button here inside this activity underline main that

28
00:01:46,200 --> 00:01:52,640
example we need to go back inside this content underline minute example in order to interact with this

29
00:01:52,740 --> 00:01:53,410
screen here.

30
00:01:53,430 --> 00:01:54,000
OK.

31
00:01:54,240 --> 00:02:01,590
So let's actually click on linearly out vertical here and then we can actually put this up linearly

32
00:02:01,590 --> 00:02:04,050
out in in the center of the screen.

33
00:02:04,070 --> 00:02:11,290
OK so now let's actually click on this relatively out here and let's actually find the padding attributes

34
00:02:11,340 --> 00:02:12,490
as you can see here.

35
00:02:12,780 --> 00:02:18,910
And for the I'll just put the number zero here and then press on enter on your keyboard.

36
00:02:19,230 --> 00:02:27,040
So as you can see here now the layout and the layout height of this linearly is match parent.

37
00:02:27,150 --> 00:02:31,150
And this means that it's going to actually cover the entire screen.

38
00:02:31,170 --> 00:02:32,060
As you can see here.

39
00:02:32,070 --> 00:02:32,850
OK.

40
00:02:33,330 --> 00:02:42,930
So now it's actually dragging are large takes you here into this screen and let's actually change the

41
00:02:42,930 --> 00:02:47,990
layout Viets of this large text view to match parent.

42
00:02:48,000 --> 00:02:52,290
It's going to actually cover the entire width of this screen.

43
00:02:52,560 --> 00:02:55,770
And then let's actually double click and this takes you here.

44
00:02:56,310 --> 00:03:07,010
And let's actually keep or text to this text to you for example please enter our number.

45
00:03:08,070 --> 00:03:08,830
OK.

46
00:03:09,180 --> 00:03:11,620
And for the ID just type in here T.

47
00:03:11,680 --> 00:03:13,160
XTi enter.

48
00:03:13,230 --> 00:03:13,900
OK.

49
00:03:14,190 --> 00:03:20,310
And let's actually directing our text field into this screen here.

50
00:03:20,460 --> 00:03:25,490
So now as you can see here we've got a text fields folder here.

51
00:03:25,860 --> 00:03:31,110
And inside this fall there as you can see we've got different types of text fields.

52
00:03:31,110 --> 00:03:31,680
OK.

53
00:03:31,980 --> 00:03:36,050
So for this application we just need this plain text here.

54
00:03:36,330 --> 00:03:44,450
So just like here and as you can see here the layout width of these component is much patent.

55
00:03:44,450 --> 00:03:45,250
OK.

56
00:03:45,800 --> 00:03:49,740
So now there's actually double click on this text file here.

57
00:03:50,060 --> 00:03:56,950
And you can actually give a text to this text field and we can actually give an ID to this text field.

58
00:03:56,960 --> 00:04:03,400
So for the ID just type in here it is the number we can actually give a hint to.

59
00:04:03,400 --> 00:04:05,270
These are textfield here.

60
00:04:05,270 --> 00:04:12,590
So we just need to finding the hint attributes that is actually related to this text we had here.

61
00:04:12,590 --> 00:04:12,890
OK.

62
00:04:12,890 --> 00:04:16,720
So as you can see here we've got this hint attribute here.

63
00:04:16,790 --> 00:04:22,070
We can actually type in here please enter a number

64
00:04:25,610 --> 00:04:26,420
OK.

65
00:04:26,900 --> 00:04:33,530
So as you can see here we've got ahint here and now let's actually dragging our text view here into

66
00:04:33,530 --> 00:04:34,640
this screen.

67
00:04:34,730 --> 00:04:40,640
So just click on this large takes you here and then track it here and then you can actually double click

68
00:04:40,640 --> 00:04:46,160
on this text view and just type in here for the text result.

69
00:04:46,700 --> 00:04:50,880
And for the ID just type in here t x the result.

70
00:04:51,310 --> 00:04:51,840
OK.

71
00:04:52,040 --> 00:04:56,520
So now let's actually dragging Potin into this screen.

72
00:04:56,900 --> 00:04:59,800
So as you can see here we've got this pattern here.

73
00:04:59,930 --> 00:05:06,370
So just select it and then you can actually put it here and double click on the spot in here.

74
00:05:06,500 --> 00:05:11,120
And for the text just type in here show me the result

75
00:05:13,990 --> 00:05:19,650
OK and for the ID you can actually give an ID to the spot.

76
00:05:19,670 --> 00:05:22,330
So the end result.

77
00:05:23,270 --> 00:05:24,030
OK.

78
00:05:25,200 --> 00:05:27,480
So hopefully that makes sense.

79
00:05:27,690 --> 00:05:31,330
And now we can actually go inside this.

80
00:05:31,470 --> 00:05:36,220
Our main activity job file here and lets actually did it.

81
00:05:36,240 --> 00:05:41,790
These are lines of code here that are actually related to the Options menu.

82
00:05:41,820 --> 00:05:47,670
And this actually did these lines of code here that is actually related to create a floating action

83
00:05:47,700 --> 00:05:48,110
button.

84
00:05:48,150 --> 00:05:57,570
So we don't need this floating action here and now we can actually create some objects from these classes

85
00:05:57,570 --> 00:06:04,380
that you can see here for example an object from this text view class an object from this textfield

86
00:06:04,440 --> 00:06:11,490
class which is actually an added text class and object again from this text view class and an object

87
00:06:11,940 --> 00:06:13,540
from this button class.

88
00:06:13,560 --> 00:06:14,210
OK.

89
00:06:14,640 --> 00:06:16,620
So let's actually create these objects.

90
00:06:16,650 --> 00:06:18,970
So just typing here text view.

91
00:06:19,800 --> 00:06:22,820
And then we can actually give a name to these takes you.

92
00:06:22,950 --> 00:06:27,770
So as you can see here inside this content underline mean that mean that example as you can see we've

93
00:06:27,780 --> 00:06:30,100
got this please enter a number.

94
00:06:30,290 --> 00:06:37,590
So as you can see here we don't need to actually change the value of this text here.

95
00:06:37,590 --> 00:06:44,820
I just wanted to put this text you here in order to let the user know that he should actually enter

96
00:06:45,060 --> 00:06:47,700
a number inside this text field.

97
00:06:47,730 --> 00:06:48,230
OK.

98
00:06:48,480 --> 00:06:52,410
So I don't need to actually change this the value of this text view.

99
00:06:52,410 --> 00:06:57,980
So inside this man actually did that job or I can actually create an object for these results.

100
00:06:57,980 --> 00:06:58,800
Takes you here.

101
00:06:58,800 --> 00:06:59,240
OK.

102
00:06:59,370 --> 00:07:06,930
So I can't just take me here really takes the result and then I put an assignment operator here and

103
00:07:06,930 --> 00:07:14,510
then I need to actually cast this object to takes three object and then I just type in here find you

104
00:07:14,520 --> 00:07:18,330
by ID are that ID that T.

105
00:07:18,500 --> 00:07:21,040
XTi resort.

106
00:07:21,500 --> 00:07:22,570
OK.

107
00:07:23,480 --> 00:07:29,890
So now let's actually create an object from these added text class.

108
00:07:29,960 --> 00:07:35,790
So let's actually go inside this main activity that right here and now I just need to type in here.

109
00:07:35,890 --> 00:07:39,180
It text class.

110
00:07:39,230 --> 00:07:47,010
So as you can see here we've got this a text class and then we can actually give a name to this object.

111
00:07:47,030 --> 00:07:49,050
So EDT enter.

112
00:07:49,510 --> 00:07:50,290
OK.

113
00:07:50,660 --> 00:07:56,750
And then put an assignment operator here and then again we need to actually cast this object to an edit

114
00:07:56,750 --> 00:07:58,430
text object.

115
00:07:58,430 --> 00:08:08,210
So let's actually typing here edit text find view ID are that ID that EDT.

116
00:08:08,990 --> 00:08:09,710
Number.

117
00:08:09,810 --> 00:08:14,230
So now as you can see the ID of our object is EDT number.

118
00:08:14,240 --> 00:08:14,740
OK.

119
00:08:14,870 --> 00:08:21,710
The idea of our component inside this content underline main that examen is EDT number as you can see

120
00:08:21,710 --> 00:08:22,170
here.

121
00:08:22,190 --> 00:08:29,160
So it's better to actually give the same name as the name of our ID to our object.

122
00:08:29,210 --> 00:08:34,550
So here we can actually change this name to EDT number.

123
00:08:34,690 --> 00:08:41,210
OK so now let's actually create an object from the spot in class as you can see here.

124
00:08:41,210 --> 00:08:42,380
Show me the result.

125
00:08:42,410 --> 00:08:46,300
So here I can just type in here button.

126
00:08:46,820 --> 00:08:47,370
OK.

127
00:08:47,450 --> 00:08:50,090
PTEN result.

128
00:08:50,780 --> 00:08:56,810
And then I put an assignment operator here and then I need to actually cast this object to about an

129
00:08:56,810 --> 00:08:57,520
object.

130
00:08:57,530 --> 00:09:02,650
I just need to type in here or find your ID are that Id dot BT.

131
00:09:02,740 --> 00:09:08,180
End result and then I need to actually put a semi-colon at the end of my statement.

132
00:09:08,180 --> 00:09:11,100
So now let's actually hold the Command key.

133
00:09:11,390 --> 00:09:17,180
Or if you are using a Windows machine you need to actually hold the control key on your keyboard and

134
00:09:17,180 --> 00:09:19,420
then click on this it takes here.

135
00:09:19,700 --> 00:09:24,730
So as you can see here this edit text actually extends text view.

136
00:09:24,800 --> 00:09:32,000
And this means that this text class actually inherits all of the features and behaviors that are inside

137
00:09:32,000 --> 00:09:33,750
this text view class.

138
00:09:33,890 --> 00:09:40,040
And this takes you class as you can see extends all of the features and the behaviors that are inside

139
00:09:40,040 --> 00:09:41,410
this view class.

140
00:09:41,420 --> 00:09:47,220
So as a result we can actually conclude that this as it takes is actually our view.

141
00:09:47,570 --> 00:09:55,370
OK so here we need to actually cast this object to an edit text object in order to let the compiler

142
00:09:55,370 --> 00:10:00,150
know that we are actually dealing with an edit text object not a view object.

143
00:10:00,170 --> 00:10:00,600
OK.

