So.
Now let's actually look at these Meffert here and create a view right.
So here we are actually writing this method uncreate view and this live at X. It's free arguments.
The first one is inflator which is of type layout inflator.
The second argument is of type view group which is container.
And as you can see the first argument is actually saved instance state because of the bundle.
And here as you can see we are actually returning a value of type view.
So as you can see here the returned type the return value actually of these Smurfit is actually of type
view right.
So we must return a value of type view from this method.
So here it says Return inflator.
So here it refers to this inflator argument that inflate.
It calls this inflate Meffert on this inflator here on this replated object.
And for the first argument if you're actually passing this a fragment underline main that exemption
for the second argument we're passing the container and for the first argument we're passing the value
falls.
So I already talked about this effect and you already know about these arguments and you all also know
how what are these arguments are doing here.
Right.
So now let's actually create a value of type view and let's assign this value as you can see here.
This inflates if it actually returns a value of type view.
So we can actually assign that return value to a object of type view.
Right.
So if I actually hold the comment here on my keyboard and if you are using a Windows machine you need
to hold the control on your keyboard.
And if I click on this inflate here as you can see now you can see that this may if it inflate actually
returns a value of type view.
So you can see that the returned value the return type actually of this method is View right.
So that's why you can see that we can assign the return value to this view object.
So we created you are valuable here.
So now I'm going to pasting some more lines of code here.
Inside is uncreate me angry at you 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 I pasted inside this uncreate view Meffert.
So as you can see in line number 54 I am actually initializing these all animal names at least assignment
operator new at least here right.
So here we are actually assigning an empty Aurelia's to this.
All animals name names list.
So as you can see here in line number 27 we actually declared this list here.
All animals names list and we assigned an empty out a list to this valuable.
All animals names list.
So in number 55 as you can see here we have animals names quis list assignment operator new alias.
So again we are assigning an empty list to these animals names quiz list in line number 56.
We're actually initialising the secure random number.
So take your random number assignment operator new set your random number so we use this valuable here
in order to actually choose our random animal inside our quiz.
So now let me show you the emulator.
So as you can see here our application is running on this emulator.
And now for example we want to actually guess what is where it's going to be the name of this animal
for example this is Cat.
Right.
And we use this secure random number in order to actually get our random animal from the list and put
it here inside our case.
Right so here we have for example an eagle and we can actually guess the name of the eagle.
And now it's his right.
And now it's going to show us the next image right.
So here as you can see we have actually initialising this random number.
And here we are initialising these handler so handler assignment operator new handler.
Right.
So now we get a pasting up sound like some lines of code here and there 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 I pasted here and now I'm going to explain to
you what's going on here.
Exactly.
So a line number 61 here.
I actually referred to this line and said animation here.
So I declared this animation here is in line actually in line number 47 as you can see here which is
after an image animation right Ron and said animation.
So here inside this uncreate and create Mefford uncreate view.
Actually I want to actually add here inside is uncreate view method.
You want to initialize this right answer animation so I referred to the name of this animation here.
Wrong answer animation assignment operator animation Attila's dot load animation.
So we actually created and exemplified inside our project.
So now let me show you the structure of the project.
As you can see here we actually created this folder here and inside this folder we have this animation
Ron underlined and said underline animation.
So if you want to look at this animation.
So animation is that animation first you're going to pass the context.
So the context is going to be get activity.
So it's going to automatically get the activity as the context and for the second argument to actually
assign a reference to this specific anime animation file that we have inside our project.
So our thoughts on that that and answer animation as you can see here.
Right.
So here we are.
Initialising this valuable run and said animation and here we are actually calling on effect on this
animation.
Wrong answer.
And he mentioned that said repeat count 1.
So it's going to actually repeat this animation only one a one time only once.
So for example let me show you the emulator here for example.
Now let me show you another image here and this is for this is actually a flappy bird right.
So now I choose Fox and I was going to only execute this animation on the one time.
So that's the job of this set up with Chown here and now I'm going to actually into some more lines
of code here and then I'm going to explain to you what's going on here.
So now let me show you the structure of the project.
So just click on here our view tool windows and then our project.
And now just go inside this layout folder inside this rest folder and then double click on this flight
meant underlayment at examen here.
As you can see we have this linear left right at the top so now I want to ask you to change the ID of
this linearly out.
So as you can see here this is the id attribute and the id attribute here is a content underline made.
So I want to change this value to another value so I can just typing animal quis animal cuius linear
layout
Okay.
So this is going to be the ID of the top linear layout here inside are exemplified.
So if I click on the preview here at the right hand side and now if I click on this linearly out here
as you can see now here it is referring to the top linear layout.
Right so now let's actually go back inside our main activity AFFREIGHTMENT the java file here and DoubleClick
stop here.
In order to make this area wider.
Now I'm going to paste in some lines of code here.
So now as you can see here these are the lines of code that I pasted here.
And now I'm going to explain to you what's going on here exactly.
So in line number 66 as you can see here are you referred to this animal is linear.
So now let me scroll to the top here.
As you can see we have these animal linearly out here.
So this is our animalcules linear layout.
So this is of type linearly out private linear length linearly out.
And I told you that we created this variable here in order to actually hold the value of the color of
the willynilly out.
So for example when the user wants to change the background color of the linear length of the keys we
can actually hold that value and we can set that value on are linearly out here.
So this is really important that we create are valuable for our linear layout.
And as you can see the name is animalcules linearly.
So now let me scroll down here.
So here I want to initialize that variable.
So animalcules linearly out assignment operator and here I am testing this value to our linear layout
and view that find view by I-T are that idea that animalcules linear layout as you can see here.
So here I initialized this animalcules linear layout and then here we have these t XTi.
Question number.
So again we actually declared that this takes the question number which is of type takes few here in
line number 40.
As you can see here.
So this rally is going to hold the value of the text of the question number that you want to show to
the user.
So now let's scroll down here.
I want to actually initialize this variable th's the question number.
Assignment operator.
So here I am casting this value to a text view object view.
That's fine by as you can see here because here we are actually inside of this fragment we must refer
to this view.
OK this is very important as you can see we created this view here in line number 52.
And here we want to inflate this fragment on the container.
So the container is actually made activity and we have a fragment here.
Right.
So if you want to inflate the fragment on the container which is of type Bugel up so it is very important
that we get a view which is that specific fragment as you can see here let me show you that structure
of the project.
And now let me kind of view tool windows and then project here as you can see inside this layout folder.
We have activity on the line main We have content on the line main and we have fragment underline main.
So here as you can see it is activity under load that example here.
It is actually included in this content underlayment and its image here right.
And here are content underly minute exam and he is actually holding this fragment.
So this content underly minute example here is going to be the view group of these fragment underline
minute example.
So we need to actually get the reference to this fragment and then we can actually access it the components
that we have inside this fragment.
As you can see if you have bartend we have linear layouts and we have image views and so much other
components.
So if I actually go back inside this main activity fragment that of a file here that this is very important
that when I want to initialize these actually variables I actually as you can see here I am referring
to this view here.
And then I try to call find viewable ID and then I referred to that specific component inside that Brightman's.
This is very important.
So hopefully you get the idea and now as you can see I am initialising this takes the question number
of you that find the way Id are that ID that he the question number and we have I am the animal I am
casting it to an image view for you.
Thats fine.
Id artist Id that I anti-animal and now I want to talk about these lines of code here.
As you can see.
So now just pay attention to these lines of code.
This is very important.