 Hello everyone, my name is Mr. Sandesh Paray, I am currently working as an assistant professor in the department of computer science and engineering at Vulture Institute of Technology, Sallapur. In this video, I am going to cover the topic which is called the graphics which is related to the android. It is called as the android graphics. So at the end of this session you will be able to understand the different types of the graphics mechanisms which came under the android and the various tools and how to use these graphics and what are the benefits of using these graphics. So let us start with the basic that is users perspective versus developers perspective. First of all think that why graphics is necessary for any developer to use in this application. The basic funda is to attract the consumer, means whenever you are going to use the graphics it gives the wow effect to certain application and it becomes very easy to use that application. So according to the user it is nothing but the one attraction point if certain graphics is used in this application and apart from this according to the developer the graphics is very different, means the developer has to think about the device size which may be used for this application and its orientation, its resolution and the color which is used and various other things are also there means the density of that particular device which is used by the consumer means he has to think about all this perspective, all these issues to give the graphics to particular application. This is the main difference between the user's perspective and the developers. So android graphics can be broadly categorized according to the capabilities of the android platform and there are three categories of that. The first one is the drawable and canvas, second one is the hardware acceleration and third one is the open GL. Drawables means it is providing the certain mechanism to draw the 2D graphics. It is related to the 2D graphics and canvas is also providing the rendering or the component related to the 2D graphics. This drawable and canvas comes under the 2D graphics and hardware acceleration it means it gives the boost or it gives the more it makes more flexible to the android application by accelerating the graphics power means GPU is there graphics processing in it. So by using it it makes more attractive and it is mostly used in the graphic based applications. For example certain gaming applications are there which is purely based on the graphics one. At that time this hardware acceleration is used and third one is the open GL. It is providing the framework for the 3D graphics. The difference between the drawable and canvas and the open GL is nothing but the drawable and canvas provide 2D mechanism for the graphics and open GL provide the framework for the 3D graphics one. On this basis these are categorized. So as I told you earlier that there is different type of the densities means according to the device the density varies. So how this density varies means what is the difference means even though the size of the device is also same it does not mean that resolution of that devices are matching because the density may differ means density is nothing but the number of pixel you can see the pixel on any electronic display device. So that matters a lot here and you can call this pixels as a dots also. So it is measured in terms of the dots per inch it is shortly called as the DPI. So on this basis this category is done here low density, medium density and high density. You can see that in the low density there is very few dots per inch and in high density there are much more. So it is a difference. So if the density becomes high or the low then it will differ in the position and the size of the image also. So this has to think by the developer during development of the android application. You can see the difference between the low density application and the high density application. So on this basis the mainly screen density is categorized into the four parts one. It means first one is the LDPI means low DPI, second one MDPI it means medium, third one is the high definition PI and then extra high definition PI. According to the density it get characterized and whenever certain image is used in particular app building at that time that image is mostly kept in the resource drawable folder. Then according to the user's device it may vary. So it is the responsibility of the user to store this image in different format in the different folder under the resource drawable folder. It means if there is only one image then he can put anywhere. Otherwise he has to make difference between them. It is the basic fundamental between behind this. So these are the categories made by the according to the density. So there is one question for you guys that is what is the difference in different categories of the graphic capabilities of an android platform. So there are three categories as I told you earlier that drawables are providing 2D graphics components for building the 2D graphics and same for canvas and hardware acceleration gives the boost by the making GPU more accessible for such applications like gaming and Open GL is another one Open Source 3D framework. It is used by mobile platform to render the 3D graphics. Shape drawable is written in the code language in this fashion. As you can see the shape is at the beginning and then we have to specify the color. Start color means vertically upward and end color means vertically downward one. In this fashion the color has to vary in that particular. Now here the rectangle shape is chosen. That's why now we are going to provide the left top, right and bottom margin. So this is the margin on the particular app screen and there is also provided the radius one. It means the box is round shaped and the corners are 8 dp of round corners. So you can see the edit test is customized using the shape drawables. In this you can see that the particular height width of the rectangle is specified and whatever contents are there they are wrapped. So these are some parameters regarding the particular shape in that app for the rectangle one. It is specified here. So a simple custom view is shown here. As you can see line number 21 it is on draw canvas is provided as a parameter one and then bitmap image is provided as a parameter to draw this. And then see at the line number 8 my view which is extended class of the main view class and then using the paint and then by making the images and paint functions we have to draw the particular rectangle on the screen of the applications. So in this fashion it is designed and whenever any touch is made and then that particular x and y axis parameters are taken as you can see line number 25 and 6. So these are some functions regarding the canvas and custom view of the android applications. So these are some references I used to make this video. Thank you.