mdpi and hdpi images are not correctly loaded into the device android
i have images accordingly int the hdpi and mdpi folder but when i run the application the hdpi images are loading fine on the high resolution devices but when i run on medium resolution 320 x 480 the hdpi images are loading not the medium ones. i have also tested moving the images to res/drawble but nothing happens.. please help me on this i have set the manifest file with
<supports-screens android:smallScreens="false" android:normalScreens="true"
android:largeScreens="true" and开发者_JAVA技巧roid:anyDensity="true">
<uses-sdk android:minSdkVersion="8" />
Please check if your drawable folders are correctly named.
They should be:
- drawable-mdpi
- drawable-hdpi
Also, be sure that your file names are identical. It works fine for me.
Sometimes it may even work to clean the project using Eclipse.
EDIT:
I think your project is working fine, but you're making some mistakes with your setup. You probably haven't read the developer guide properly: http://developer.android.com/guide/practices/screens_support.html
Anyway, what you're essentially doing is saying that mdpi = 320 x 480 and hdpi = 480 x 800 pixels. But that's not correct. The DPI (dots per inch) has nothing to do with the actual resolution of the screen. You can easily have a medium DPI screen with a resolution larger than 320 x 480 pixels.
Read the link that I posted - especially the part called "How to Test Your Application on Multiple Screens". That should help you.
精彩评论