简体   繁体   中英

How can I set the resolution for the different screen size in android

I know that my question is very simple But my question is not for example about how to support multiple screen sizes in android or like this. I know that we should put the launcher icon in the minmap folder instead the Drawable folder and there are standard sizes in android for the icons.

  • MDPI: 48x48
  • HDPI: 72x72
  • XXHDPI: 144x144
  • XXXHDPI: 192x192

But if I create an image with paint program in windows and its resolution is 1920 * 1080 , as the result it is very big for android.Now my question is, Should I change the 1920 * 1080 resolution to the 48 * 48 resolution by another program? Or If I put the 1920 * 1080 resolution in the minmap folder in a android project, Does the minmap folder in the android studio changes the 1920 * 1080 resolution for example to the 48 * 48 resolution?

Excuse me If my question is simple.

Those 'standard sizes for icons' are for action bar icons or icons of similar size, but what they do show is the ratio of images/icons for different screen sizes. An image with resolution 1920 * 1080 is likely not an icon but rather a background image, but you should either simply put your image in one of the drawable folders and the OS will scale the image respectively for each screen size, or you can include one image in each drawable folder than follows the recommended ratios.

If you put your image in the /drawable folder, instead of mdpi/hdpi folders the, that image will be scaled automatically depending on your device resolution so if your device is mdpi the image would be scaled down so you will save some memory.

So you can just put the image in the /drawable folder and dont mind it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM