1
00:00:00,270 --> 00:00:06,170
Hi everyone in this theater you are really going to go ahead and create another Android application.

2
00:00:06,390 --> 00:00:07,340
So just click on this.

3
00:00:07,380 --> 00:00:13,290
Start in your Android studio project and then for the name of the application just type in here app

4
00:00:13,770 --> 00:00:22,980
57 and then click on next and here choose API 16 Android 4.1 Jelly Bean for the minimum SDK and then

5
00:00:22,980 --> 00:00:28,030
click on next and here choose empty activity next.

6
00:00:28,560 --> 00:00:30,240
And here don't change anything.

7
00:00:30,330 --> 00:00:32,580
And then they can finish.

8
00:00:32,580 --> 00:00:36,110
So as you can see here our project is actually created.

9
00:00:36,270 --> 00:00:41,240
So let's actually go inside this red folder and then look at the trendies layouts directory.

10
00:00:41,460 --> 00:00:44,830
And here as you can see we have this activity Underland made that example.

11
00:00:44,970 --> 00:00:46,420
So double click on it.

12
00:00:46,830 --> 00:00:48,910
So here is our lay out.

13
00:00:48,990 --> 00:00:52,310
So as you can see here that there is a problem with the app.

14
00:00:52,380 --> 00:00:54,350
As you can see here missing Stites.

15
00:00:54,360 --> 00:00:58,570
So here I just need to click on this app from here and it choose this material light.

16
00:00:58,710 --> 00:01:03,810
And here I just need to select these materials that are light that dot dot action.

17
00:01:04,070 --> 00:01:04,680
OK.

18
00:01:04,710 --> 00:01:10,370
Or I can actually use this material that like it's OK but I prefer this one.

19
00:01:10,770 --> 00:01:12,770
And then click click on OK.

20
00:01:13,200 --> 00:01:17,150
So here is the thing that I want to use for my application.

21
00:01:17,250 --> 00:01:22,680
So I just need to select this hello world text view here and then press on delete key on my keyboard.

22
00:01:22,710 --> 00:01:26,280
So now I want to design the user interface of my application.

23
00:01:26,310 --> 00:01:31,820
So first of all I just need to write a linear layout vertical into this relatively out here.

24
00:01:31,890 --> 00:01:34,620
So I just need to select this linearly as vertical here.

25
00:01:34,650 --> 00:01:37,330
That is actually inside of this little swirl there.

26
00:01:37,500 --> 00:01:43,920
And then here I just need to put it at the center of these relatively out here and then I just need

27
00:01:43,920 --> 00:01:49,020
to drag some a large stakes views into this linearly at vertical.

28
00:01:49,020 --> 00:01:53,070
So inside these widgets folder as you can see we have these text views here.

29
00:01:53,070 --> 00:01:58,460
So just select this large view and then put it at the center of this linearly or vertical.

30
00:01:58,580 --> 00:02:05,270
And now for the layout of this large text view I just need to assign the value match parent.

31
00:02:05,280 --> 00:02:10,880
So as you can see here inside these properties section as you can see I just need to change this layout

32
00:02:10,880 --> 00:02:13,070
to be its value to match President.

33
00:02:13,170 --> 00:02:13,900
OK.

34
00:02:14,280 --> 00:02:16,270
And DoubleClick on this text view.

35
00:02:16,280 --> 00:02:18,550
Here is the text of the state's view.

36
00:02:18,560 --> 00:02:24,420
And for the ID just type in here takes the name and then person enter key on your keyboard.

37
00:02:24,690 --> 00:02:25,610
So that's actually right.

38
00:02:25,670 --> 00:02:28,720
Another large takes you into these linearly or vertical.

39
00:02:28,800 --> 00:02:34,770
So just select these large you here and put it at the center of this in any nearly vertical and below

40
00:02:34,770 --> 00:02:35,780
these takes you here.

41
00:02:35,800 --> 00:02:36,550
OK.

42
00:02:36,990 --> 00:02:42,590
And for the lay out we assign the value match parent here and as you can see and double click on these

43
00:02:42,680 --> 00:02:48,120
text view here and deletes the text that this takes for you and for the ID just type in here takes the

44
00:02:48,450 --> 00:02:53,130
e-mail and then press on Enter key on your keyboard.

45
00:02:53,130 --> 00:02:58,550
So now let's actually write another large takes into this linearly at vertical here.

46
00:02:58,650 --> 00:03:05,130
So just select this large this here and track it into these linearly vertical and put it below.

47
00:03:05,130 --> 00:03:06,510
These are text here.

48
00:03:06,510 --> 00:03:06,960
OK.

49
00:03:07,020 --> 00:03:12,970
So just put it at the center of this linearly vertical and then for that out we assign the value match

50
00:03:13,020 --> 00:03:18,450
parent here as you can see and double click on these takes you here to take.

51
00:03:18,500 --> 00:03:25,410
This is the text that this takes for you and for the idea just typing here takes the user name and then

52
00:03:25,410 --> 00:03:27,560
person entelechy on your keyboard.

53
00:03:27,590 --> 00:03:32,010
So let's actually try another large takes you into this linearly as vertical.

54
00:03:32,010 --> 00:03:36,640
So he has just selected the large text view and put it's below the stakes here.

55
00:03:36,900 --> 00:03:42,600
And for the layout which assign the value match Pallant as you can see here double double clicking on

56
00:03:42,600 --> 00:03:43,890
the view here.

57
00:03:43,890 --> 00:03:50,640
This is the takes of the stakes for you and for the ID just type in here takes the password and then

58
00:03:50,670 --> 00:03:53,030
our present Enter key on your keyboard.

59
00:03:53,340 --> 00:03:59,940
OK so now let's actually drag our button into this linearly at vertical So as you can see here in this

60
00:04:00,020 --> 00:04:03,960
vedettes Well there we have this user interface components.

61
00:04:03,960 --> 00:04:07,810
I just need to select this button here and I just need to put it below this.

62
00:04:07,850 --> 00:04:11,350
Takes and insight is linearly or vertical at the center.

63
00:04:11,360 --> 00:04:11,550
OK.

64
00:04:11,580 --> 00:04:17,700
At the center of this linearly as vertical and again for the lay at which this button assigned the value

65
00:04:18,000 --> 00:04:27,330
match parent and double click on the button here for then a text just saying the value or move to two

66
00:04:27,420 --> 00:04:38,750
second activity and for the ID just type in here PTEN move and then press enter key on your keyboard.

67
00:04:39,060 --> 00:04:42,570
So now let's actually go inside our main activity file here.

68
00:04:42,990 --> 00:04:47,250
And now let's actually declare some user interface components here.

69
00:04:47,250 --> 00:04:50,460
So just to create some text view objects.

70
00:04:50,520 --> 00:04:55,890
So I just need to type in here take that view and then the name of the first user interface component

71
00:04:55,890 --> 00:04:57,540
is going to be the name.

72
00:04:57,770 --> 00:04:59,180
OK come on.

73
00:04:59,280 --> 00:05:05,880
So here you can actually declare some objects of the same type of the same type in one line.

74
00:05:05,880 --> 00:05:10,920
So here I just put this text view up here the name of this takes you class and this is going to be the

75
00:05:10,920 --> 00:05:16,770
name of the first object text the name the name of the second object is going to be Tillich's the email.

76
00:05:17,040 --> 00:05:23,910
As you can see here inside our activity underline mainit exam and here we have this dx the name the

77
00:05:23,910 --> 00:05:26,660
email the X the user name and takes the password.

78
00:05:26,670 --> 00:05:31,610
So as you can see here all of this for our user interface components of type text view.

79
00:05:31,740 --> 00:05:38,220
So I just I can actually declare these objects in one line or KTXA the name to the e-mail the X the

80
00:05:38,500 --> 00:05:40,090
username.

81
00:05:40,810 --> 00:05:41,310
OK.

82
00:05:41,340 --> 00:05:43,770
Come on anti-X the password

83
00:05:46,840 --> 00:05:53,020
and here I just need to put us a semicolon at the end of my statement and insights and create Meffert

84
00:05:53,050 --> 00:06:00,280
as you can see I can just stay Pontiac's the RTX the name assignment operator and here I just want to

85
00:06:00,700 --> 00:06:02,140
instantiate these objects.

86
00:06:02,140 --> 00:06:02,600
OK.

87
00:06:02,710 --> 00:06:07,710
So in line 9 as you can see I'm just declaring these objects that are of type text view.

88
00:06:07,840 --> 00:06:12,250
And here inside this uncreate Meffert are you able to instantiate these objects.

89
00:06:12,370 --> 00:06:14,370
So takes the name assignment operator.

90
00:06:14,380 --> 00:06:21,990
And here I just see to cast this object to a text view object find view by I-T or that Id thought TXI

91
00:06:22,030 --> 00:06:23,310
the name.

92
00:06:23,500 --> 00:06:26,420
And then I need to put a semicolon at the end of my statement.

93
00:06:26,530 --> 00:06:35,620
And here again I can't just dive into the e-mail assignment operator takes view find view by id our

94
00:06:35,620 --> 00:06:41,850
data ID that takes the email and then I need to put a semicolon at the end of my statement.

95
00:06:41,980 --> 00:06:49,390
And here again I can refer to the name of this object to the username so the user name assignment operator.

96
00:06:49,600 --> 00:06:54,380
And then here I need to cast this object to a text view object find view by ID.

97
00:06:54,490 --> 00:06:59,480
Or that idea that takes the user name and the.

98
00:06:59,530 --> 00:07:05,180
And here I need to put a semicolon at the end of my statement takes the password as you can see here.

99
00:07:05,230 --> 00:07:11,140
Assignment operator and here I need to cast this object where it takes your object find view about ID

100
00:07:11,240 --> 00:07:18,890
are already 30 x the password and then I need to put a semicolon at the end of my statement.

101
00:07:18,910 --> 00:07:23,540
So here are let's actually declare and create an object of take button.

102
00:07:23,560 --> 00:07:25,600
So here I can just say pain.

103
00:07:25,690 --> 00:07:32,800
So if I don't want to create an object of a button I can just type in find view by ID or thought Id

104
00:07:32,890 --> 00:07:34,930
that PTEN move right.

105
00:07:34,960 --> 00:07:41,050
So here as you can see in line 24 I'm just referring to the spot into the idea of the spotting that

106
00:07:41,080 --> 00:07:46,240
I actually put that they actually created inside this activity here inside this activity and underline

107
00:07:46,240 --> 00:07:48,290
don't mean that exam and I have this button right.

108
00:07:48,370 --> 00:07:50,120
And the idea is between then move.

109
00:07:50,290 --> 00:07:52,060
So inside is main activity class.

110
00:07:52,120 --> 00:07:57,620
I don't want to actually create an object of a button and assign this value of another variable.

111
00:07:57,750 --> 00:08:02,470
I just referred in here just three freighting to the name of that button with the idea of that button

112
00:08:02,720 --> 00:08:05,510
find view by ID order ID that media and move.

113
00:08:05,530 --> 00:08:12,690
And here I can actually call the unclick listener here and click listener Excuse me said Uncle listener.

114
00:08:12,940 --> 00:08:18,670
So here I can't just call the set Uncle listen and hear the Smurfette on this object as you can see

115
00:08:18,670 --> 00:08:19,290
here.

116
00:08:19,300 --> 00:08:21,110
So Uncle listener knew.

117
00:08:21,160 --> 00:08:25,000
So here I can actually create an anonymous class.

118
00:08:25,090 --> 00:08:27,440
And you an Uncle listener.

119
00:08:27,850 --> 00:08:32,790
And as you can see here it actually created these lines of code for me as you can see.

120
00:08:32,980 --> 00:08:39,790
And we have actually an inner class an anonymous inner class that is actually implementing a view that

121
00:08:39,810 --> 00:08:45,200
actually listen to interface and as it results in it needs to actually implement the Smurfit enclave

122
00:08:45,210 --> 00:08:45,510
here.

123
00:08:45,520 --> 00:08:50,480
As you can see in say these angry men for they can actually put my logic here so I can actually type

124
00:08:50,540 --> 00:08:57,380
the intent intent assignment operator new intent.

125
00:08:57,640 --> 00:09:03,110
So for the first argument I need to put the context the context is going to be this activity.

126
00:09:03,130 --> 00:09:09,940
So main activity that this and the second argument is going to be that class that you want to transfer

127
00:09:09,940 --> 00:09:10,290
to.

128
00:09:10,420 --> 00:09:14,280
So you want to actually move from this class to the second activity class.

129
00:09:14,290 --> 00:09:19,120
So here I can just type in search and we didn't actually create this second activity class so we're

130
00:09:19,150 --> 00:09:21,090
going to create it in a moment.

131
00:09:21,090 --> 00:09:28,140
Second activity that class and here I need to put a semi-colon at the end of my statement.

132
00:09:28,160 --> 00:09:32,150
So here are we need to actually create this second activity class.

133
00:09:32,270 --> 00:09:38,150
So in our project structure I just need to selectees our package here.

134
00:09:38,150 --> 00:09:40,980
This package that this class main activity is inside there.

135
00:09:41,000 --> 00:09:41,640
OK.

136
00:09:41,930 --> 00:09:46,160
And right click on needs new and this time I want to actually create an activity.

137
00:09:46,160 --> 00:09:46,630
OK.

138
00:09:46,760 --> 00:09:52,310
So I want to create the jobs class and the xml file at the same time.

139
00:09:52,460 --> 00:09:55,590
So activity and here choose MTI activity.

140
00:09:55,730 --> 00:10:01,230
So for the name of the activity activity just open here seargent activity.

141
00:10:01,820 --> 00:10:06,420
And as you can see here it's going to create this class activity name and it's going to generate a layout

142
00:10:06,500 --> 00:10:11,840
file for me lay out name is going to be activity underline second and this activity is not going to

143
00:10:11,840 --> 00:10:13,220
be the larger activity.

144
00:10:13,220 --> 00:10:17,810
The long term activity is going to be mean active with your kids want to check this checkbox here and

145
00:10:17,810 --> 00:10:21,100
it can actually put this class inside this package as you can see here.

146
00:10:21,110 --> 00:10:23,120
So I just need to click and finish here.

147
00:10:23,450 --> 00:10:29,570
So now the second activity is created for me and this if it is actually automatically generated for

148
00:10:29,570 --> 00:10:30,410
me said content.

149
00:10:30,450 --> 00:10:32,800
You are totally out of that activity second.

150
00:10:32,930 --> 00:10:37,620
So inside this layer directory we can see that this activity Underland second that is similar.

151
00:10:37,730 --> 00:10:41,360
So now let's actually go inside the main activity that of our file here.

