So now as you can see our application is actually running on the emulator.
And here we can see this image.
And let's actually click on this image view here and let's see what happens.
So now as you can see we can see this image here and let's actually change this image so scroll to the
left and actually click on this image here.
And now we can see this image.
And this is the torso.
OK.
So now I want to add actually some animation effects to this image switcher as you can see here.
So it is going to be a little bit nicer.
OK.
So now inside this main activity the job filed here after this line of code that says I am just creature
that says factory here now and when actually I think some are animation effects to this image switcher.
OK so now I'm going to actually paste in some lines of code here 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 face that here first about in
1955 I referred to this image object IMT switcher data set in animation.
OK.
So this is the set in animation.
So when the image is actually going to appear on the screen as you can see when I actually click when
I actually select one of these animals.
So for example this dolphin.
So this is going to be the set in animation.
So this time here inside the practices I refer to this animation utils dots laut animation.
So as you can see here if you have a class called animation you teals and we have a static method actually
this is a class for the key that animation.
So let's actually go to our browser here.
As you can see you can actually enter this you are in your web browser and then you will be guided to
this page.
So we have this animation utility class.
So as you can see this is actually a public class animation utility.
OK.
And this is the summary.
And here it says define common utilities for working with animation.
OK.
And here you can see some of these benefits.
And here this is the animation method.
OK.
And it says that this if it loads an animation object from a resource.
OK.
So this Meffert actually accepts two arguments.
The first one is the context.
So as you can see here this method actually accepts two parameters the first parameter is actually the
context as it has the application context used to access resources.
So as I said before we use context in order to actually access resources outside of our activity.
OK.
So application context used to access resources.
OK.
And the second argument as I can see is actually the ID end of the resource ID of the animation to load.
OK.
So we need to actually choose the what kind of animation we want to load on our particular object.
OK so now let's actually go back to our Android studio.
So animation you tell us that lothe animation and as you can see here we need to actually passing two
arguments to parameters.
Main activity that this is the context and the second one is the android that are that and then that
faded.
So we have other other kinds of animations so if I could you can delete this fading in here and here
as you can see we have these animations sliding sliding left.
OK.
And here as you can see this is the sit out animation.
So I've just set out animation.
So this happens when the image is going to be actually disappear.
OK so when I actually if I actually go back and say this emulator so here of any user as you can see
this is Dolfin OK so if I click on this of this dolphin image is going to be disappeared from the screen.
That animation is going to happen.
OK.
So I am just switchers that set set out animation.
And here inside the prentices animation you utilize that animation.
So we need to actually first of all passing the context main activity that this and the second and the
second one is how the kind of animation that we want to put that we actually want to implement on an
object.
OK.
Android that are.
And in that fadeout.
So I can actually delete this one and choose sliding slide out right.
OK so 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 here it's actually as you can see we can actually scroll to the left in order to see the other images.
And if I actually click on this image now as you can see we have an animation effect here.
OK.
And if I actually select this image here now you can see this animation effect.
OK.
So it is actually these like this one.
And it's an it's really nice.
OK.
So beautiful.
So this one as you can see here we have this image of these folks here.
And as you can see here because we said that this image creature as you can see because we said that
the left part of this image view as you can see here to be that content for the beach and the content
for their height.
See this image it's actually a little bit larger.
OK so it's going to take a little bit larger space.
OK.
And let's actually to select other images and here you can see this image here.
OK.
So if I actually select this one now we can see this image here.
OK.
So you can actually change this Arap content to for example match parent.
OK.
So I can just type in match parent for the Wii and match parent for the height.
OK.
So let's actually do it on our project again.
So here again our application is running.
So if I select this image now you can see this image here at the bottom.
So now if you actually scroll to the left in order to access it to see the other images here you can
see this image here.
And here you can see this here this image.
Now you can see this image here.
Now this actually the selectees image and we can see this image here.
OK.
So it is actually taking the entire Viets and the entire height of the actually image switcher.
As you can see here match parent.
And so remember that it says that match parent match parent refers to the parent of this image.
Suture OK.
So for example match parent refers to that to the parent of this image view.
So here inside is make a few Mefford.
He created an image of you here.
OK.
And as you can see IMJ view that sits lay out palms.
So the parent of this interview is going to be this image switcher.
So if I click on this Clearchus here you can see inside this componentry this image is going to be the
parent and the image the view that is going to be inside this image switcher is going to be the child
of this image.
OK.
And inside this and this image suture is actually the child of this linearly out vertical here and this
linearly as vertical is the parent of this image suture.
So hopefully that makes sense.
And if you have any questions please post the discussion in the course and then I'll do my best to answer
all of your questions.
Thank you very much for watching and I'll see you in the next tutorial.