I download a static map from Google Maps Static API. When I download the image in browser, the size is ok (728x224). You can check the url from below.
But when I try to view it in my android app it's to small (540x166). Of course I could display it with 'centerCrop' but it's not ideal solution. As far as I know, both sizes are in pixels so it should fit perfectly. I log it this way:
Log.i(TAG, "view size: "+mapPicture.getWidth()+"/"+mapPicture.getHeight());
Log.i(TAG, "pic size: "+mapPicture.getDrawable().getIntrinsicWidth()+"/"+mapPicture.getDrawable().getIntrinsicHeight());
And the logcat looks like this:
11-29 21:41:37.547: I/DetailsFragment(18064): view size: 728/224
11-29 21:41:37.547: I/DetailsFragment(18064): http://maps.google.com/maps/api/staticmap?center=0,0&zoom=3&size=364x112&scale=2&sensor=false
11-29 21:41:37.547: I/DetailsFragment(18064): pic size: 540/166
I download the image with ImageManager and test on a hdpi device.
So why the downloaded pic has different size than it should?
Edit:
When I download an image twice as big, the drawable inside the ImageView
is almost the same size as previously: pic size: 540/189