I have all of my images in the drawable-hdpi folder. And I finished all of my layouts for all screen sizes. But i forgot to put the images in the drawable-mdpi folder and drawable-ldpi folder. If a phone with an mdpi screen density were to download my application would it just use the images in the drawable-hdpi folder? Or would an error occur because there are no images in the mdpi folder?
The only images in the mdpi and ldpi folder is the icon.
A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon . There are several different types of drawables: Bitmap File.
In Android Studio inside the res folder, one can find the drawable folder, layout folder, mipmap folder, values folder, etc. Among them, the drawable folder contains the different types of images used for the development of the application.
The phone is gonna take the images from where they're available. The result will be the same than if you had only a "drawable" folder, it is just not a logical name if you have only one drawable folder.
You are not forced to provide resources for every configuration, the system just take care of using the most adapted and is clever enough to do that job. You should read that to fully understand how it works : http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch
Lyrkan is mostly correct. Mdpi phones will take the image from the drawable-hdpi folder. But the system knows that those images are too big for the phone and scale them down for you.
Most of your users won't notice. The only problem is that on phones with mdpi or ldpi screens all the images will get a little bit blurry because they are scaled down on the fly to match the other screen resolution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With