I get very interesting results when testing an application developed using MonoDroid on different devices with different screen sizes and densities.
I have the following (simplified) folder structure created in my project:
- range hood
- draw-ldpi
- draw-mdpi
- draw-HDI
- draw xhdpi
The image in the drawing is a folder. Images in other folders are identical, except for the size and letters that are drawn on top to indicate what density it is (for example, L, M, H or X) depending on the folder.
Regardless of the screen density of the device (verified using Android.Util.DisplayMetrics), the images displayed for the application are displayed from the drawable-mdpi folder.
I created a quick test application in Eclipse that used the same xml layout file and the same set of images. Running this application on different devices displays the correct image.
I am in complete loss, and now it has cost me the best part of a two-day diagnosis and, finally, to identify the cause of the problem.
Has anyone been able to overcome this problem? Thanks in advance!
android dpi resolution xamarin.android
Justin
source share