Search code examples
androidscalasbtdpi

LG G3 doesn't use image from xxxhdpi if there are alternatives — as a result, image is blurred


Say, I have an ImageView with both sizes set to wrap_content, and it has some image: android:src="@drawable/xyz".

If this image appears only in xxxhdpi folder, then everything is fine. However, if it appears in any of the other drawable directories (xxhdpi, xhdpi, hdpi, mdpi, or even sw320dp), then it doesn't use the image from xxxhdpi and, as a result, the image is blurred. (it's not easy to notice, but I can notice this and I don't think QHD displays make any sense if their full resolution is not used)

Is it possible to solve this issue without resorting to multiple APKs?

More precisely, this is LG D856 phone (dual SIM), with Android 4.4.2.

update

This is weird, but if I create project in Android Studio instead of this tool for coding for Android in Scala, then there's no such issue…

update 2

APK file: http://dropbox.com/s/lqdj9w7iimh2gj9/magicgoose-example-debug.apk?dl=0
Source code: http://dropbox.com/s/cs4pngpkvkoe5q2/dpi-example-src.zip?dl=0

Source can be built using SBT (scala build tool)
I'm using this plugin: https://github.com/pfn/android-sdk-plugin


Solution

  • The problem was in that the plugin did set target API level to 1 by default. When I set it explicitly to 21, the problem is gone.