And here inside the unclick Meffert I can just put in some lines of code here.
So first of all this actually creates a new class so just click on View tool windows and then a project
an inside job or folder here you can see this is our package.
OK.
And now I want to actually create another activity class for my second Underland activity that.
OK.
So every exemplify as you can see here needs to have an activity activity activity class.
And here I want to actually create an activity for this second underline activity that is similar.
So here I just need to right click on this package here.
OK new and then click on dhaba class and for the class name just type in here.
Second activity Okay now as you can see this is our second activity class and because if you want to
actually create an activity here I just enjoy taking extends activity.
OK.
As you can see here this is our activity class.
OK.
Or I can even inherit from this Abqaiq are compact activity which I should in indirectly inherits from
these all of the features and behaviors that are inside of the activity class.
So inside the second activity class instead of just referring to the name of this activity class I can
just open up compact activity OK.
And this is better because in this way we are going to inherit lots and lots of methods from those classes
that we actually inherit directly or indirectly.
OK.
So first of all inside of this class I need to actually override the uncreate method that we actually
inherit from the superclass.
So uncreate OK I just need to select this uncreate and for that you can see here on create save instance
state.
So as you can see here this is our uncreate method.
OK.
And here as you can see it is calling this on creating an effect on these superclass.
OK and now let's actually called the set set content view here said content view Meffert and then select
does it here sent content for you.
And as you can see here it accepts an argument of type integer layout raise ID.
OK.
And here we need to actually be fair to the name of our ID inside of these.
So you have to lay out that ok or dot lay out that section I underline activity.
OK.
So in this way it can actually initialize the second activity exemplified.
OK.
So so that we can actually see this file on the screen.
OK.
And now.
So now let's actually go back inside these main activity the double file here.
And now let's actually put putting some more lines of code here.
Here I want to actually put in some lines of code in order to let use.
If the user click on the spot in there and actually guide it to the second screen which is the second
activity here.
OK.
So now inside of this enclave if at first about I need to actually create an intent object.
OK.
And intent is actually a class that allows us to actually go from one activity to another activity.
OK.
So intent intent that the name of our object is intent.
Assignment operator new intent.
So here I actually created an object of type intent.
OK.
And the name of this object is intent and this object actually allows us to go from one activity to
another activity.
OK.
So here I can just type in intent that sets class.
OK.
So this method actually to accepts two arguments the first argument is actually the source class the
first class.
The second argument is the destination classic class that is actually our target.
OK.
The first class is the main activity.
OK.
So here I just need to type in this comma and the second class is the second activity.
OK so the second activity is this second activity as you can see here.
So I can't just say insurgent activity that class and then I need to put in a semicolon at the end of
my statement here.
And now I need to actually the column effect from the from the activity class.
OK.
So here we are actually inheriting all of the features and behaviors that are inside of this activity
class.
OK.
So I can just typing start activity.
So this activity Meffert actually accepts an argument of type intent.
So here I can just refer to the name of this object.
Intent OK.
And now let's actually run our project and see what happens.
So as you can see here our application is running on this emulator and this is our first activity.
OK.
And this is our source class and we want to actually move on to the next activity.
OK.
So here I just need to click on this.
Let's go to second activity OK.
So let's click on this.
And now as you can see our application crashed.
Let's actually go inside this lock here and see what's the cause of this error.
And here as you can see it says how do you declare this activity in your Android manifest that XML.
So let's see what's the advertisement manifested exemplified.
So let's actually click on this view here to the windows project and here as you can see we have a manifest
folder here.
OK.
And inside of this manifest folder there is there is a file called Android manifesto examine and this
is our Android manifesto exemplified.
And as you can see here inside of this manifest take as you can see there are some lines of code here
and we have this application here.
OK.
Application tag and inside of this application tag we have this activity.
OK.
So here as you can see this is the activity attack and inside of this activity tag as you can see it
says Android name dot main activity.
So does that mean activity refers to this main activity class as he can see inside of this package.
Ok this is our own package.
So if I actually declare another class inside another package I need to actually first of all refer
to the name of that package and then I need to refer to the name of that class.
But here we don't need to refer to the name of this package.
Just putting dots here is enough so that main activity refers to the name of this class inside of this
package.
And here we have Android label as you can see here and here as you can see it says Android app frailty.
OK this is the label of our application app for flirty which you can see at the top of the email emulator
app.
Firstly And this is the theme of our application.
So at sign the style slash apophenia does no action bar.
OK.
So I'll talk more about these values later.
But here as you can see it says intent dasht fruiterer.
OK.
So here for the first time that application is actually running we need to actually specify the activity
the first activity the entry point of activity inside is.
And like manifests for the entry point of our application is this main activity.
OK.
Activity underline me.
OK.
So here we need to specify that we want to actually first of all run when we want to show the the activity
Underland mean that exemption to the user.
OK.
So first what that are laid out is the entry point for our application.
So here inside this intent dash filters tag as you can see here it says Android that intense that action
that main.
OK we have two takes action and category.
And here it says Android that intent the chatter luncher.
OK so the activity underline minute example is the lantern over application.
OK.
So here after the ending tag of this activity here I want to actually create another activity for the
second activity.
So inside of this application tag all you want to create another attack here.
OK.
So after this activity here I can't just create another activity.
So after this activity tag I can't just create another activity here.
So just open this tag here activity and then press enter key on your keyboard.
So here as you can see inside of these double quotes it says second activity or that main activity here
I can choose this second activity OK.
And then here I can actually specify the label.
OK.
So here I can just type in label and then present into the key on your keyboard and inside the double
quotes.
I can just type insurgent activity.
OK.
I can even specify the theme of my activity so Feme.
And here I can choose this screen here at Slate and slide slash and Feme does no action.
OK.
And then here I need to actually close the stack here or Katis activity take.
So just I just need to put in a closing tag here.
And as you can see here we can see this activity tag here.
So this is our activity tag that we actually putting in after this tag here.
And inside of this application.
OK.
So activity and right name the second activity Android label second activity and Rufin.
I feel that no action.
OK so now let's actually run our project.
So again as you can see our application is running on this emulator and it says this is our first activity.
Okay.
And now I want to actually click on this button here that says let's go to second activity.
And now as you can see this is our second activity here.
OK.