 Hello everyone, my name is Mr. Sandesh Pare, I am currently working as an assistant professor in the department of computer science and engineering at Walton Institute of Technology SolarPort. In this video, I am going to cover the topic that is animation in the android. At the end of this video, you will be understood that different types of the animation in the android applications means how this different type of the animations are working in the android applications and what is the difference between these kind of the animations. So let us start by the types of the android animation. But before we are going to types of the android animation, it is very essential to understand why it is necessary to use the animation in the android application. Simply the basic funda between behind the android animation is to attract the consumers. Means whenever we are applying any effects or the animation while using the android application, it will get attracted by the users. Like when the song is buffering and at the time of the downloading, you have to provide a certain animation there, otherwise it will become a low effect app. So it is very essential to use the animation in the android application development. So the types of the android animations are. First one is the frame by frame and second one is the transition. And again in the transition, there are two types of the animations are there, view animation and property animation. Let us start by the frame by frame. What happens in the frame by frame is nothing but the number of images. You can call it as a frame. The number of images are taken by the developer. And he has to order in the sequence. He has to order them in sequence and then he has to provide the certain duration for each image or the each frame. So that they can play in serial manner. But by the user's end, it will feel as an animated one. So he has to make sequence and display these frames. That's why it is called as the frame by frame technique. And second one is the transition technique. In the transition techniques, regardless of the frame by frame, it is only one object is taken and effect is given to particular that object. That means the different type of the effects are applied on the same object. And they are displayed in the sequence. That's why the user feel that particular object is the animated one. It is the difference between both of them. And in the view animation, a simple view is provided. On that only, the developer has to apply the animation. So it is basically limited to the only view. That's why it is called as the view animation. But in the property animation, it is not like that. Besides the view, you can change any property of any objects. There is no limitation that only views can be affected. So this is the difference between the view animation and property animation. Now let's move to the drawable animation. Drawable animation, creating of the drawable animation simply follows the three steps. First one is the pre-work step. It means, as I told you earlier, that he has to assemble the different images, the different frames which he has to put in this animated video. And then he has to give a certain order to that images. And after that, he has to give the duration for which the particular frame has to be displayed in the animation. So it comes under the pre-work step. And the next step is to compose the animation. It means resource drawable, XML file is created. That XML file contains all the resource drawable. The number of the images are the images used for the animation. And he has to put this into the XML file. And he has to give the order and the duration. And after that in the last, that is the third step is the realizing the animation on the user interface that involves the associating the animation to a view and then playing it. It means he has to simply all the assembly file taken together and then it is played in the sequence so that animated video can be displayed on the user interface. This is the format of the drawable animation XML file. You can see that this XML file mainly starts with the tag animation list. So it contains the list of the images which he has to provide in the animation. And it ends with the line number 7 that is slash animation list. And in that he has to provide the list that is look at line number 3, 4, 5 and 6. Here first image 1 is given, second image 2 then image 3 and image 4 are provided. These are the resources that is images and it should be always in the sequence in which it should be displayed in the animation one. And then after that the particular duration for which this image is displayed is also given for that image that is android duration. Next 250 is the microsecond for which it is displayed. This is the basic format of the drawable animation XML. Next this is the android animation view on create the button is there. And on clicking the particular button that image are again showed to the users and background particular resource of the android animation is provided. On the click event this is raised frame animation will be get started as you can see the line number 15 to 17. It is shown that it is at the background it will be played. Let us move to the view animation as I told you earlier that it is used to perform the twinned animation on a view. It is related to the simply view a simple view and properties of this view are changed. And that is why the user feel the animated video one. It is regarding to the certain properties of a simple view. These are the position it means the developer can change the position of the particular object and then rotation it means he can move the rotate the particular object. He can enlarge or delize the particular object by changing its size and he can change transparency of the object also. So these are some properties of the particular view which the developer can change and make it animated one. And again there are three steps which we have seen of the drawable. That is the pre-work step in which he has to gather the view or the object for which he has to perform the certain animation one. And then using the compose the animation it means he has to provide the certain transformation which we have seen that is the position rotation size and transparency. He can change the particular properties of the object and then after that in the third step that animation will be realized on the user interface by playing this object. You can see the particular scaling is there. It means 50% line number 9 is giving that 50% of size enlargement and dislargement is done and alpha is for transparency. That particular duration of the object is also provided a 500 millisecond. So applying the new animation of the object is nothing but on click event. As you can see particular green-bot image then it will start the animation by providing the hide animation as a parameter one. And in the create one you can see the button is taken and then particular image is taken and whatever the properties can be changed according to it. One question for you guys that what are the limitations of the view animation? View animation is limited to a simple view and that is position rotation size and transparency but it is not good for one. Next is the property animation as I told you earlier the difference between the size animation and the property animation is nothing but it is not limited to particular view. For example if you want to change the background color of particular layout it means it is providing the facility to change any properties of any object. It is the basic difference. So you can see that on click event again their color animator will be started and on start the create function will be called and then according to the calling of the view parent get created and color animator will be created by the object animator object by providing background color as a parameter which is taken here red and blue also ok and duration is set by 1000 millisecond. So these are some references I used to make this video thank you.