1
00:00:00,460 --> 00:00:04,950
And now as you can see after this line of quote here as you can see it is in its day in court and just

2
00:00:04,950 --> 00:00:07,880
creating an object of intent.

3
00:00:08,040 --> 00:00:10,000
And here I am initialising this object.

4
00:00:10,050 --> 00:00:10,660
OK.

5
00:00:10,860 --> 00:00:16,170
So as you can see the error is gone and we have the second activity that last in our project and now

6
00:00:16,350 --> 00:00:20,620
I can just type in start activity for result.

7
00:00:20,910 --> 00:00:23,090
So why did they actually put this method here.

8
00:00:23,100 --> 00:00:29,950
Why didn't I put this thought activity as you can see here before we put this stuff activity here.

9
00:00:30,240 --> 00:00:31,490
And we just passed the intent.

10
00:00:31,500 --> 00:00:32,110
Right.

11
00:00:32,310 --> 00:00:39,210
So now in this project I'm want to actually get some data from the second activity and when the user

12
00:00:39,210 --> 00:00:45,600
clicks on the back button under a mobile device the information is going to be sent to the first activity

13
00:00:45,600 --> 00:00:47,460
which is going to be the main activity OK.

14
00:00:47,580 --> 00:00:53,430
So but this time all you want to send data from the this is activity Underland second.

15
00:00:53,580 --> 00:00:59,290
You want to send data from this activity Underland second to this activity underline main the example.

16
00:00:59,570 --> 00:01:04,770
OK so in so this activity underlines that search and that meant that example here I want to design the

17
00:01:04,770 --> 00:01:08,250
user interface of this XML file here.

18
00:01:08,460 --> 00:01:11,820
So as it see here again I mean it was specified at Feme.

19
00:01:11,820 --> 00:01:15,750
So just click on this app from here and then Mattioli light.

20
00:01:16,110 --> 00:01:21,810
And here I just need to select this one material that light that thought dark action and then click

21
00:01:21,810 --> 00:01:23,520
on OK here.

22
00:01:23,520 --> 00:01:31,220
So now let's actually drag our linearly out vertical at the center of this relatively out here and here.

23
00:01:31,230 --> 00:01:37,980
This time I'm on to actually track some text fields into this linearly as vertical so in is text fields

24
00:01:37,980 --> 00:01:39,590
for that as you can see here.

25
00:01:39,990 --> 00:01:41,940
We've got these text fields here.

26
00:01:42,000 --> 00:01:49,680
So just write a plain text field into this linearly as vertical and put it at the center of this linearly

27
00:01:49,680 --> 00:01:54,140
as vertical and end up and this up takes the edge it takes here.

28
00:01:54,140 --> 00:01:55,730
It is a textfield.

29
00:01:55,920 --> 00:01:59,670
And for the ID just type in here it is the name.

30
00:02:00,300 --> 00:02:02,710
And then press Enter key on your keyboard.

31
00:02:02,730 --> 00:02:08,340
So here inside these are properties section that is actually related to this EDT name to it it takes

32
00:02:08,340 --> 00:02:08,850
here.

33
00:02:09,060 --> 00:02:15,400
Let's actually find the hint attribute as you can see here we have this attribute here.

34
00:02:15,540 --> 00:02:16,720
So for the hint.

35
00:02:16,860 --> 00:02:17,830
Just type in here.

36
00:02:17,850 --> 00:02:20,420
Enter name.

37
00:02:20,990 --> 00:02:25,280
OK so this is going to be the hint for this eddy takes here.

38
00:02:25,290 --> 00:02:30,450
So now let's actually direct another text field into this linearly at vertical.

39
00:02:30,540 --> 00:02:37,580
So here inside is a text fields folder just select just plain takes here and put it below this and it

40
00:02:37,590 --> 00:02:44,450
takes this text with here and at the center of this linearly as vertical and double click on it.

41
00:02:44,520 --> 00:02:51,270
And for the ID to step in here it is he emailed and in person and Turkey on your keyboard.

42
00:02:51,390 --> 00:02:56,360
So for the hint attribute that is actually related to this as it takes here just step in here.

43
00:02:56,400 --> 00:02:58,920
Enter email.

44
00:02:59,460 --> 00:02:59,970
OK.

45
00:03:00,090 --> 00:03:01,250
Dot dot dot.

46
00:03:01,590 --> 00:03:02,950
And now this it right.

47
00:03:03,060 --> 00:03:04,530
Another plane takes years.

48
00:03:04,530 --> 00:03:10,070
Just select this plane takes you and put it below this it takes here and double click on it.

49
00:03:10,170 --> 00:03:16,400
For the idea to stay in here EDT username and then person enter key on your keyboard.

50
00:03:16,410 --> 00:03:23,690
So for the hint attribute to step in here enter username OK.

51
00:03:24,400 --> 00:03:31,130
And now let's actually write another plain text and other text field into these linearly vertical.

52
00:03:31,180 --> 00:03:38,300
So just like this a plane takes here and put it below this it takes here double click on it and for

53
00:03:38,350 --> 00:03:45,620
the ID just step in here it the password and then person enter key on your keyboard.

54
00:03:45,640 --> 00:03:50,490
So here as you can see here we have this paint attribute that is related to this added text.

55
00:03:50,500 --> 00:03:53,230
So for the hint attribute just typing here.

56
00:03:53,230 --> 00:03:55,520
Enter password.

57
00:03:56,320 --> 00:04:02,240
And then that dot dot and then press on Enter key on your keyboard so you can see here we have these

58
00:04:02,830 --> 00:04:04,250
details for the e-mail.

59
00:04:04,420 --> 00:04:05,660
So this actually selected.

60
00:04:05,740 --> 00:04:08,680
And he had inside these properties section here.

61
00:04:08,710 --> 00:04:10,230
Let's find the food type.

62
00:04:10,230 --> 00:04:11,190
As you can see here.

63
00:04:11,380 --> 00:04:14,030
So if you have this in food type attribute.

64
00:04:14,050 --> 00:04:21,550
So just open this attribute here and now just a checklist checkbox that says text e-mail address so

65
00:04:21,550 --> 00:04:23,770
the input type is going to be e-mail address.

66
00:04:23,770 --> 00:04:24,200
OK.

67
00:04:24,370 --> 00:04:28,090
So the user needs to actually enter an e-mail address.

68
00:04:28,090 --> 00:04:30,930
And here as you can see if you have this Enter password.

69
00:04:31,000 --> 00:04:35,160
So let's actually open this in food type that is related to this.

70
00:04:35,210 --> 00:04:35,920
It takes.

71
00:04:36,090 --> 00:04:42,930
And for the input type just check the check box that says a text password as you can see here.

72
00:04:42,940 --> 00:04:47,950
So the user needs to enter a password as it gets it's going actually it's not going to show the user

73
00:04:48,010 --> 00:04:49,580
the password that is entered inside.

74
00:04:49,720 --> 00:04:54,110
This is the text here because it's in food type is going to be password.

75
00:04:54,400 --> 00:05:00,580
So now let's actually drag our button below what is inside this linearly as vertical and below this

76
00:05:00,630 --> 00:05:01,630
it takes here.

77
00:05:01,810 --> 00:05:07,360
So inside these widgets folder we have this button just select it and put it below this.

78
00:05:07,420 --> 00:05:10,410
And it takes and inside is nearly vertical.

79
00:05:10,420 --> 00:05:16,420
Just put it at the center of this linearly as Westacott and then for the lay out which is kind of ideal

80
00:05:16,420 --> 00:05:21,490
match parent as you can see here and then click on the button here.

81
00:05:21,490 --> 00:05:27,790
And for the text just typing in here Don exclamation mark and for the idea just they've been here PTEN

82
00:05:27,790 --> 00:05:28,830
done.

83
00:05:29,200 --> 00:05:31,650
And then press enter on your keyboard.

84
00:05:32,020 --> 00:05:40,060
So now let's actually go inside the second activity of a file here and now I want to actually declare

85
00:05:40,120 --> 00:05:42,000
some text objects here.

86
00:05:42,160 --> 00:05:43,160
So it takes.

87
00:05:43,240 --> 00:05:46,910
So again I can actually declare these objects in only one line.

88
00:05:46,990 --> 00:05:50,440
So I just referred to the name of this editrix class.

89
00:05:50,440 --> 00:05:58,090
And now the name of the first object is going to be EDT name Karma and the name of the second object

90
00:05:58,090 --> 00:05:59,860
is going to be EDT.

91
00:06:00,100 --> 00:06:09,950
E-mail comma the name of the word object is going to be EDT a user name come up and the name of the

92
00:06:10,360 --> 00:06:13,600
object is going to be EDT password.

93
00:06:14,230 --> 00:06:16,920
And then I need to put a semicolon at the end of my statement.

94
00:06:16,930 --> 00:06:17,420
OK.

95
00:06:17,530 --> 00:06:22,810
So I actually declared for objects of type takes Eadie takes in only one line.

96
00:06:22,810 --> 00:06:24,170
As you can see here.

97
00:06:24,190 --> 00:06:27,940
So now let's actually go inside this uncreate Smurfette.

98
00:06:28,270 --> 00:06:28,980
OK.

99
00:06:29,020 --> 00:06:32,220
And here I want to actually instantiate these objects.

100
00:06:32,230 --> 00:06:35,370
These objects that are actually of type text.

101
00:06:35,470 --> 00:06:39,300
So here the first object that I want to instantiate is this object is the name.

102
00:06:39,640 --> 00:06:43,160
So here I can save an editing name assignment operator.

103
00:06:43,330 --> 00:06:51,960
And here I need to cast this object to a text object find you by I-T are that Id dot ity name.

104
00:06:52,460 --> 00:06:55,970
And then I need to put a semicolon at the end of my statement.

105
00:06:55,990 --> 00:06:58,110
The second object is going to be Editta email.

106
00:06:58,120 --> 00:07:03,780
So here I can just say I mean it is e-mail that it is email assignment operator.

107
00:07:03,910 --> 00:07:12,600
And here I need to cast this object away as it takes object OK find view ID are thought Id that ADT

108
00:07:12,860 --> 00:07:13,820
email.

109
00:07:14,610 --> 00:07:19,750
And that I need to put a semicolon at the end of my statement and the word object is going to be Editta

110
00:07:19,750 --> 00:07:20,360
username.

111
00:07:20,360 --> 00:07:28,220
So EDT username assignment operator and and then I need to cast this object to a EDT to edit text.

112
00:07:28,400 --> 00:07:29,520
Ok fine.

113
00:07:29,530 --> 00:07:37,540
View by I-T are thought Id that EDT username and that I need to put a semicolon at the end of my statement

114
00:07:37,990 --> 00:07:40,740
and the fourth object is going to be its password.

115
00:07:40,870 --> 00:07:49,180
So ADT password assignment operator and that I need to access this object where it takes object find

116
00:07:49,180 --> 00:07:56,790
view ID are that Id dot EDT password as you can see here.

117
00:07:56,800 --> 00:08:02,320
So I just need to put a semicolon at the end of my statement and here as you can see inside this activity

118
00:08:02,320 --> 00:08:05,460
underline a second that underlies the candidates email.

119
00:08:05,510 --> 00:08:06,420
We have this Potten.

120
00:08:06,430 --> 00:08:10,610
So inside the second activity that I will find I don't want to create a variable.

121
00:08:10,630 --> 00:08:12,630
And then instantiate that variable.

122
00:08:12,820 --> 00:08:19,230
So here I can just create I just referred to the name of that idea to the idea of the button find view

123
00:08:19,230 --> 00:08:22,720
by ID or that Id dot between.

124
00:08:23,290 --> 00:08:32,530
Ok dad said Uncle listener new view that Uncle listen and as you can see here here I am just creating

125
00:08:32,620 --> 00:08:34,250
an anonymous class.

126
00:08:34,270 --> 00:08:38,890
So now I can actually put my own logic inside this article Meffert.

127
00:08:38,920 --> 00:08:43,510
So when a user clicks and these are PTEN Dunbarton this uncle it is going to be executed.

128
00:08:43,510 --> 00:08:44,090
OK.

129
00:08:44,350 --> 00:08:50,260
So first of all because I want to actually get these data that that were actually entered inside of

130
00:08:50,290 --> 00:08:55,120
these added texts here as you can see we've got some text fields here right.

131
00:08:55,120 --> 00:09:00,090
So the user is going to actually enter some data into these text fields.

132
00:09:00,100 --> 00:09:00,620
OK.

133
00:09:00,820 --> 00:09:07,060
So in order to get those data I need to actually create some cheese inside my second activity class.

134
00:09:07,060 --> 00:09:07,480
OK.

135
00:09:07,540 --> 00:09:13,990
So that the main activity can actually referred to those keys in order to access the values that are

136
00:09:13,990 --> 00:09:15,640
related to those keys.

137
00:09:15,640 --> 00:09:20,900
So in say the second activity class here I'm going try to paste in some lines of code and then I'm going

138
00:09:20,900 --> 00:09:23,710
to explain to you what's going on here.

139
00:09:23,740 --> 00:09:28,270
So as you can see here these are the lines of code that they actually pasted here.

140
00:09:28,420 --> 00:09:32,960
So Line 14 as you can see here I have a variable of type string.

141
00:09:33,100 --> 00:09:36,300
So the access modifier of this variable is public.

142
00:09:36,670 --> 00:09:43,120
This variable is actually static so this we can actually refer to the name of this class and then access

143
00:09:43,210 --> 00:09:44,890
the value of this variable.

144
00:09:45,040 --> 00:09:47,070
Ok this is actually a class variable.

145
00:09:47,230 --> 00:09:51,320
So here as you can see it is rowdier but it's actually final.

146
00:09:51,340 --> 00:09:58,030
So this means that this variable is constant and we cannot change the value that is actually assigned

147
00:09:58,420 --> 00:09:59,740
to this constant.

148
00:09:59,870 --> 00:10:00,680
OK.

149
00:10:00,880 --> 00:10:07,630
And here I the data type of this constant is strange as you can see and the name of this constant is

150
00:10:07,840 --> 00:10:10,620
request text field name.

151
00:10:10,630 --> 00:10:15,840
So this is going to be the name of our key and here I assign this value request name to this key.

152
00:10:15,940 --> 00:10:16,420
OK.

153
00:10:16,460 --> 00:10:20,370
Here in line 15 as you can see of we have another key.

154
00:10:20,380 --> 00:10:23,060
So public static final this is.

155
00:10:23,140 --> 00:10:25,310
This is actually a constant that is actually static.

156
00:10:25,330 --> 00:10:27,660
So this is going to be.

157
00:10:28,000 --> 00:10:30,710
So we can actually refer to the name of this class.

158
00:10:30,940 --> 00:10:33,530
And then I can put the data no not documentation.

159
00:10:33,550 --> 00:10:37,490
And then access this constant request takes real email.

160
00:10:37,750 --> 00:10:43,980
So as you can see the data type of this constant is strange and the name of this constant is request

161
00:10:44,080 --> 00:10:45,290
textfield email.

162
00:10:45,370 --> 00:10:51,430
So you want to actually request that the email textfield adjectivally that is actually entered into

163
00:10:51,430 --> 00:10:54,570
these email textfield.

164
00:10:54,580 --> 00:10:55,210
OK.

165
00:10:55,480 --> 00:11:02,580
And as you can see here I assigned disvalue request e-mail to this constant and in line 16 we have another

166
00:11:02,590 --> 00:11:05,750
key request text field username.

167
00:11:05,770 --> 00:11:09,100
So you want to get the username value so request username.

168
00:11:09,100 --> 00:11:15,290
So I assign this value to this constant And here in line 17 we have another constant.

169
00:11:15,300 --> 00:11:21,110
Another key quest text with password assignment operator request password.

170
00:11:21,160 --> 00:11:21,860
OK.

171
00:11:22,060 --> 00:11:28,720
So now inside these are Uncle Comerford I want to actually paste in some lines of code here and then

172
00:11:28,750 --> 00:11:31,190
I'm going to explain to you what's going on here.

