Hi all,
I'm trying prescale bitmaps for the listview as described by Romain
Guy in has presentation at the Google IO.
But I have a problem with the size of the scaled bitmap.
Let's say I have a 256x256px bitmap, in my listview I have:
<ImageView android:id="@+id/thumbnail"
android:layout_width="80dip"
android:layout_height="80dip" />
Now I scale images using Bitmap.createScaledBitmap(originalBitmap, 80,
80, true) and change layout to
<ImageView android:id="@+id/thumbnail"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
But on the display image looks ~30% larger then it was before!
I guess it has something to do with the logical pixel density and the
physical dpi, but I can not figure out how to get this
conversion factor. I tried android.util.DisplayMetrics but still don't
get it.
Could you please explain it to me.
Thank you!
Evgeny
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---