Hello everyone. We will talk about how to support different screen sizes while we are developing android applications in this article.
Android devices come with different screen sizes. If you want to develop a good android application, you need to create flexible layouts. Otherwise, Android Operating System will take your layout and scratch it to fit the screen.
The more you support different screen sizes and different devices, the more your application will be used by people. The most beautiful feature of Android is that you can support different screen sizes and devices using one apk file.
Android Operating System uses a suitable design in a suitable device. You will develop one application but you will create flexible designs to support different screen sizes in this application.
When you develop an Android Application, you need to consider small and big screen sizes.
Android splits devices into four different categories according to screen sizes. These are small screen size, normal screen size, large screen size, and extra large screen size.
Android considers small screen size between two inch and three-point seven-inch screen sizes.
Android considers normal screen size between three-point seven-inch and four-point three-inch screen size.
Android considers a large screen size between four inch and seven-point one-inch screen size.
And Android considers an extra large screen size between seven-inch and ten-inch screen size.
These categories are phone and tablet design. If you develop an Application for Smartwatches or Android TVs, you will not use these screen sizes.
So, How to calculate screen sizes? For example, you can see in the picture, there is a phone and its screen size is five point five inches. That means, from one corner to other corner is five point five inches. And one inch equals one hundred sixty dp.
So, you will prepare your design for different screen size devices and put all of them in the one apk file. After that, everybody can use this apk file for their android devices. Because Android Operating System will take suitable design and use it on the appropriate screen.
That’s it, everybody is happy. see you in the next article.