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
creating an object of intent.
And here I am initialising this object.
OK.
So as you can see the error is gone and we have the second activity that last in our project and now
I can just type in start activity for result.
So why did they actually put this method here.
Why didn't I put this thought activity as you can see here before we put this stuff activity here.
And we just passed the intent.
Right.
So now in this project I'm want to actually get some data from the second activity and when the user
clicks on the back button under a mobile device the information is going to be sent to the first activity
which is going to be the main activity OK.
So but this time all you want to send data from the this is activity Underland second.
You want to send data from this activity Underland second to this activity underline main the example.
OK so in so this activity underlines that search and that meant that example here I want to design the
user interface of this XML file here.
So as it see here again I mean it was specified at Feme.
So just click on this app from here and then Mattioli light.
And here I just need to select this one material that light that thought dark action and then click
on OK here.
So now let's actually drag our linearly out vertical at the center of this relatively out here and here.
This time I'm on to actually track some text fields into this linearly as vertical so in is text fields
for that as you can see here.
We've got these text fields here.
So just write a plain text field into this linearly as vertical and put it at the center of this linearly
as vertical and end up and this up takes the edge it takes here.
It is a textfield.
And for the ID just type in here it is the name.
And then press Enter key on your keyboard.
So here inside these are properties section that is actually related to this EDT name to it it takes
here.
Let's actually find the hint attribute as you can see here we have this attribute here.
So for the hint.
Just type in here.
Enter name.
OK so this is going to be the hint for this eddy takes here.
So now let's actually direct another text field into this linearly at vertical.
So here inside is a text fields folder just select just plain takes here and put it below this and it
takes this text with here and at the center of this linearly as vertical and double click on it.
And for the ID to step in here it is he emailed and in person and Turkey on your keyboard.
So for the hint attribute that is actually related to this as it takes here just step in here.
Enter email.
OK.
Dot dot dot.
And now this it right.
Another plane takes years.
Just select this plane takes you and put it below this it takes here and double click on it.
For the idea to stay in here EDT username and then person enter key on your keyboard.
So for the hint attribute to step in here enter username OK.
And now let's actually write another plain text and other text field into these linearly vertical.
So just like this a plane takes here and put it below this it takes here double click on it and for
the ID just step in here it the password and then person enter key on your keyboard.
So here as you can see here we have this paint attribute that is related to this added text.
So for the hint attribute just typing here.
Enter password.
And then that dot dot and then press on Enter key on your keyboard so you can see here we have these
details for the e-mail.
So this actually selected.
And he had inside these properties section here.
Let's find the food type.
As you can see here.
So if you have this in food type attribute.
So just open this attribute here and now just a checklist checkbox that says text e-mail address so
the input type is going to be e-mail address.
OK.
So the user needs to actually enter an e-mail address.
And here as you can see if you have this Enter password.
So let's actually open this in food type that is related to this.
It takes.
And for the input type just check the check box that says a text password as you can see here.
So the user needs to enter a password as it gets it's going actually it's not going to show the user
the password that is entered inside.
This is the text here because it's in food type is going to be password.
So now let's actually drag our button below what is inside this linearly as vertical and below this
it takes here.
So inside these widgets folder we have this button just select it and put it below this.
And it takes and inside is nearly vertical.
Just put it at the center of this linearly as Westacott and then for the lay out which is kind of ideal
match parent as you can see here and then click on the button here.
And for the text just typing in here Don exclamation mark and for the idea just they've been here PTEN
done.
And then press enter on your keyboard.
So now let's actually go inside the second activity of a file here and now I want to actually declare
some text objects here.
So it takes.
So again I can actually declare these objects in only one line.
So I just referred to the name of this editrix class.
And now the name of the first object is going to be EDT name Karma and the name of the second object
is going to be EDT.
E-mail comma the name of the word object is going to be EDT a user name come up and the name of the
object is going to be EDT password.
And then I need to put a semicolon at the end of my statement.
OK.
So I actually declared for objects of type takes Eadie takes in only one line.
As you can see here.
So now let's actually go inside this uncreate Smurfette.
OK.
And here I want to actually instantiate these objects.
These objects that are actually of type text.
So here the first object that I want to instantiate is this object is the name.
So here I can save an editing name assignment operator.
And here I need to cast this object to a text object find you by I-T are that Id dot ity name.
And then I need to put a semicolon at the end of my statement.
The second object is going to be Editta email.
So here I can just say I mean it is e-mail that it is email assignment operator.
And here I need to cast this object away as it takes object OK find view ID are thought Id that ADT
email.
And that I need to put a semicolon at the end of my statement and the word object is going to be Editta
username.
So EDT username assignment operator and and then I need to cast this object to a EDT to edit text.
Ok fine.
View by I-T are thought Id that EDT username and that I need to put a semicolon at the end of my statement
and the fourth object is going to be its password.
So ADT password assignment operator and that I need to access this object where it takes object find
view ID are that Id dot EDT password as you can see here.
So I just need to put a semicolon at the end of my statement and here as you can see inside this activity
underline a second that underlies the candidates email.
We have this Potten.
So inside the second activity that I will find I don't want to create a variable.
And then instantiate that variable.
So here I can just create I just referred to the name of that idea to the idea of the button find view
by ID or that Id dot between.
Ok dad said Uncle listener new view that Uncle listen and as you can see here here I am just creating
an anonymous class.
So now I can actually put my own logic inside this article Meffert.
So when a user clicks and these are PTEN Dunbarton this uncle it is going to be executed.
OK.
So first of all because I want to actually get these data that that were actually entered inside of
these added texts here as you can see we've got some text fields here right.
So the user is going to actually enter some data into these text fields.
OK.
So in order to get those data I need to actually create some cheese inside my second activity class.
OK.
So that the main activity can actually referred to those keys in order to access the values that are
related to those keys.
So in say the second activity class here I'm going try to paste in some lines of code and then I'm going
to explain to you what's going on here.
So as you can see here these are the lines of code that they actually pasted here.
So Line 14 as you can see here I have a variable of type string.
So the access modifier of this variable is public.
This variable is actually static so this we can actually refer to the name of this class and then access
the value of this variable.
Ok this is actually a class variable.
So here as you can see it is rowdier but it's actually final.
So this means that this variable is constant and we cannot change the value that is actually assigned
to this constant.
OK.
And here I the data type of this constant is strange as you can see and the name of this constant is
request text field name.
So this is going to be the name of our key and here I assign this value request name to this key.
OK.
Here in line 15 as you can see of we have another key.
So public static final this is.
This is actually a constant that is actually static.
So this is going to be.
So we can actually refer to the name of this class.
And then I can put the data no not documentation.
And then access this constant request takes real email.
So as you can see the data type of this constant is strange and the name of this constant is request
textfield email.
So you want to actually request that the email textfield adjectivally that is actually entered into
these email textfield.
OK.
And as you can see here I assigned disvalue request e-mail to this constant and in line 16 we have another
key request text field username.
So you want to get the username value so request username.
So I assign this value to this constant And here in line 17 we have another constant.
Another key quest text with password assignment operator request password.
OK.
So now inside these are Uncle Comerford I want to actually paste in some lines of code here and then
I'm going to explain to you what's going on here.