Problem pulling images from high res folder
I have 3 drawable folders in my res folder. drawable-ldpi, drawable-mdpi, and drawable-hdpi. I have low, medium, and high res images for these respective folders.
I've been testing my application on a Samsung Moment, which is an mdpi screen. Today, I went to test my application on a Samsung Epic (480x800), which is a hdpi screen. Unfortunately, the images my application is using are incorrectly pulled from the drawable-mdpi screen and not the drawable-hdpi.
Does anyone know why?
The images in both folders are named the same. Also, in my manifest, I have the following tag:
<supports-screens
开发者_开发技巧 android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"
/>
I'm not quite sure why it wouldn't be pulling the images from the drawable-hdpi folder.
I read up a bit on the subject, and I think you dont grasp the way screen auto adjustment works, I belive you can just eliminate that whole section from the manifest and it should work based on what I read are the default values, though i might be wrong about this.
Taken from here: Manifest attributes for screens support
In general, when you declare a screen-size attribute (smallScreens, normalScreens, largeScreens, or xlargeScreens) as "true", you are signaling to the platform that your application is designed to render properly on that screen size. As a result, the platform does not apply any size-compatibility features (such as a virtual HVGA display area). If you declare a screen-size attribute as "false", you are signaling that your application is not designed for that screen size. In this case, the platform does apply size-compatibility features, rendering the application in an HVGA baseline display area. If the current screen is larger than normal size, the platform renders the application in a virtual HVGA screen on the larger screen.
Do read up on the link I posted, it should provide a clearer picture, as it has a couple of examples.
精彩评论