Hi everyone in this theater you are really going to go ahead and create another Android application.
So just click on this.
Start in your Android studio project and then for the name of the application just type in here app
57 and then click on next and here choose API 16 Android 4.1 Jelly Bean for the minimum SDK and then
click on next and here choose empty activity next.
And here don't change anything.
And then they can finish.
So as you can see here our project is actually created.
So let's actually go inside this red folder and then look at the trendies layouts directory.
And here as you can see we have this activity Underland made that example.
So double click on it.
So here is our lay out.
So as you can see here that there is a problem with the app.
As you can see here missing Stites.
So here I just need to click on this app from here and it choose this material light.
And here I just need to select these materials that are light that dot dot action.
OK.
Or I can actually use this material that like it's OK but I prefer this one.
And then click click on OK.
So here is the thing that I want to use for my application.
So I just need to select this hello world text view here and then press on delete key on my keyboard.
So now I want to design the user interface of my application.
So first of all I just need to write a linear layout vertical into this relatively out here.
So I just need to select this linearly as vertical here.
That is actually inside of this little swirl there.
And then here I just need to put it at the center of these relatively out here and then I just need
to drag some a large stakes views into this linearly at vertical.
So inside these widgets folder as you can see we have these text views here.
So just select this large view and then put it at the center of this linearly or vertical.
And now for the layout of this large text view I just need to assign the value match parent.
So as you can see here inside these properties section as you can see I just need to change this layout
to be its value to match President.
OK.
And DoubleClick on this text view.
Here is the text of the state's view.
And for the ID just type in here takes the name and then person enter key on your keyboard.
So that's actually right.
Another large takes you into these linearly or vertical.
So just select these large you here and put it at the center of this in any nearly vertical and below
these takes you here.
OK.
And for the lay out we assign the value match parent here and as you can see and double click on these
text view here and deletes the text that this takes for you and for the ID just type in here takes the
e-mail and then press on Enter key on your keyboard.
So now let's actually write another large takes into this linearly at vertical here.
So just select this large this here and track it into these linearly vertical and put it below.
These are text here.
OK.
So just put it at the center of this linearly vertical and then for that out we assign the value match
parent here as you can see and double click on these takes you here to take.
This is the text that this takes for you and for the idea just typing here takes the user name and then
person entelechy on your keyboard.
So let's actually try another large takes you into this linearly as vertical.
So he has just selected the large text view and put it's below the stakes here.
And for the layout which assign the value match Pallant as you can see here double double clicking on
the view here.
This is the takes of the stakes for you and for the ID just type in here takes the password and then
our present Enter key on your keyboard.
OK so now let's actually drag our button into this linearly at vertical So as you can see here in this
vedettes Well there we have this user interface components.
I just need to select this button here and I just need to put it below this.
Takes and insight is linearly or vertical at the center.
OK.
At the center of this linearly as vertical and again for the lay at which this button assigned the value
match parent and double click on the button here for then a text just saying the value or move to two
second activity and for the ID just type in here PTEN move and then press enter key on your keyboard.
So now let's actually go inside our main activity file here.
And now let's actually declare some user interface components here.
So just to create some text view objects.
So I just need to type in here take that view and then the name of the first user interface component
is going to be the name.
OK come on.
So here you can actually declare some objects of the same type of the same type in one line.
So here I just put this text view up here the name of this takes you class and this is going to be the
name of the first object text the name the name of the second object is going to be Tillich's the email.
As you can see here inside our activity underline mainit exam and here we have this dx the name the
email the X the user name and takes the password.
So as you can see here all of this for our user interface components of type text view.
So I just I can actually declare these objects in one line or KTXA the name to the e-mail the X the
username.
OK.
Come on anti-X the password
and here I just need to put us a semicolon at the end of my statement and insights and create Meffert
as you can see I can just stay Pontiac's the RTX the name assignment operator and here I just want to
instantiate these objects.
OK.
So in line 9 as you can see I'm just declaring these objects that are of type text view.
And here inside this uncreate Meffert are you able to instantiate these objects.
So takes the name assignment operator.
And here I just see to cast this object to a text view object find view by I-T or that Id thought TXI
the name.
And then I need to put a semicolon at the end of my statement.
And here again I can't just dive into the e-mail assignment operator takes view find view by id our
data ID that takes the email and then I need to put a semicolon at the end of my statement.
And here again I can refer to the name of this object to the username so the user name assignment operator.
And then here I need to cast this object to a text view object find view by ID.
Or that idea that takes the user name and the.
And here I need to put a semicolon at the end of my statement takes the password as you can see here.
Assignment operator and here I need to cast this object where it takes your object find view about ID
are already 30 x the password and then I need to put a semicolon at the end of my statement.
So here are let's actually declare and create an object of take button.
So here I can just say pain.
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
that PTEN move right.
So here as you can see in line 24 I'm just referring to the spot into the idea of the spotting that
I actually put that they actually created inside this activity here inside this activity and underline
don't mean that exam and I have this button right.
And the idea is between then move.
So inside is main activity class.
I don't want to actually create an object of a button and assign this value of another variable.
I just referred in here just three freighting to the name of that button with the idea of that button
find view by ID order ID that media and move.
And here I can actually call the unclick listener here and click listener Excuse me said Uncle listener.
So here I can't just call the set Uncle listen and hear the Smurfette on this object as you can see
here.
So Uncle listener knew.
So here I can actually create an anonymous class.
And you an Uncle listener.
And as you can see here it actually created these lines of code for me as you can see.
And we have actually an inner class an anonymous inner class that is actually implementing a view that
actually listen to interface and as it results in it needs to actually implement the Smurfit enclave
here.
As you can see in say these angry men for they can actually put my logic here so I can actually type
the intent intent assignment operator new intent.
So for the first argument I need to put the context the context is going to be this activity.
So main activity that this and the second argument is going to be that class that you want to transfer
to.
So you want to actually move from this class to the second activity class.
So here I can just type in search and we didn't actually create this second activity class so we're
going to create it in a moment.
Second activity that class and here I need to put a semi-colon at the end of my statement.
So here are we need to actually create this second activity class.
So in our project structure I just need to selectees our package here.
This package that this class main activity is inside there.
OK.
And right click on needs new and this time I want to actually create an activity.
OK.
So I want to create the jobs class and the xml file at the same time.
So activity and here choose MTI activity.
So for the name of the activity activity just open here seargent activity.
And as you can see here it's going to create this class activity name and it's going to generate a layout
file for me lay out name is going to be activity underline second and this activity is not going to
be the larger activity.
The long term activity is going to be mean active with your kids want to check this checkbox here and
it can actually put this class inside this package as you can see here.
So I just need to click and finish here.
So now the second activity is created for me and this if it is actually automatically generated for
me said content.
You are totally out of that activity second.
So inside this layer directory we can see that this activity Underland second that is similar.
So now let's actually go inside the main activity that of our file here.