Android Picture Distortion problem

Source: Internet
Author: User

Learning for so long, unexpectedly do not know the Android project drawable-hdpi drawable-idpi drawable-mdpi .... What do these folders do, say something official.

The original Android itself has its internal selection mechanism, simply speaking, the system will be based onMobile Phonedensity (resolution) go to different folders to choose different resolutions of the picture, you can see, these folders are stored in different resolutions of the picture, for our mobile phone to the most suitable for their own resolution of the folder to select Pictures, so as not to cause blurred images. Literally you can see ldpi refers to a low-resolution picture: Generally 120,mdpi is a medium resolution Picture: 160,HDPI High resolution Picture: 240,xhdpi:320,xxhdpi:480; So if you just keep all the pictures in the same folder, Then naturally not suitable for all mobile phones, if the density of the screen is larger than the density of your picture folder, then the opportunity to first go to the most suitable for their own folder to look for, not to consider other folders. So in order to be able to fit all of our phones, the best way is to store all the folders in a different resolution of the picture, so the system will be corresponding to find the most suitable for their own picture, of course, this will also cause a lot of trouble, that is, if an application of many pictures, and the picture is very memory, Then it will greatly increase the size of an application. So what do we do, we usually according to the current mainstream screen density to choose the most suitable folder to store pictures, now generally stored in the hdpi, so even with the phone resolution inconsistent, but due to the small error, it is not too obvious.


So I'm going to put the picture of my project in drawable-hdpi .

Android Picture Distortion problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.