soroosh.strife
soroosh.strife

Reputation: 1191

ImageView gets blurry on lenovo yoga

I'm trying to display an image in an ImageView on 10' lenovo yoga. In each drawable folder I have put an instance of the same image with different sizes:

ldpi: 184 x 294

mdpi: 248 x 397

hdpi: 375 x 600

xhdpi: 496 x 794

xxhdpi: 800 x 1280

The images are the screenshots I've taken with the same device with xxhdpi image being the original image. The problem is instead of loading the image from a high res folder it is loading the image from mdpi and thus the result is blurry. Why is it doing this?

Upvotes: 0

Views: 95

Answers (1)

Sloganho
Sloganho

Reputation: 2111

The drawable folders refer to screen density I believe. At http://developer.android.com/guide/practices/screens_support.html it says,

A set of six generalized densities: ldpi (low) ~120dpi mdpi (medium) ~160dpi hdpi (high) ~240dpi xhdpi (extra-high) ~320dpi xxhdpi (extra-extra-high) ~480dpi xxxhdpi (extra-extra-extra-high) ~640dpi

I looked up the specs of the 10' lenovo yoga and depending on the one you own, the screen density will be different. For example the Yoga 10 has 149 ppi and the lenovo yoga 2 pro has 276 ppi. So that could be the reason why it's pulling from the lower resolution drawable folders.

Upvotes: 1

Related Questions