With the designer, I create an ImageView, 45 x 45. Since the scale of my device is 2.0, I can load bitmaps of 90x90 pixels into this ImageView, and they look very crisp.
Now when I programmatically add an ImageView to the Activity, size 45dip x 45dip, the same 90x90 pixel bitmap does not fit anymore. Instead, the ImageView centers on a portion of the bitmap and crops it.
I can, however, load bitmaps of size 45x45 pixels into this ImageView, but then they are enlarged by a factor of 2, making them a little fuzzy around the edges.
I don't understand the logic behind this centering/enlarging. Could somebody please explain?
Thank you.
Regards,
Now when I programmatically add an ImageView to the Activity, size 45dip x 45dip, the same 90x90 pixel bitmap does not fit anymore. Instead, the ImageView centers on a portion of the bitmap and crops it.
I can, however, load bitmaps of size 45x45 pixels into this ImageView, but then they are enlarged by a factor of 2, making them a little fuzzy around the edges.
I don't understand the logic behind this centering/enlarging. Could somebody please explain?
Thank you.
Regards,