The designer gravity should affect the drawn image. It works fine here.
The Gravity property belongs to the BitmapDrawable that is drawn on the ImageView.
To make it simpler I will add a gravity property to ImageView.
It doesn't work as expected on your FlickrViewer when I change the ImageView gravities in the Designer. I assume this is because you assign a new BitmapDrawable to the ImageView in the program. To get it to work I need to change the gravity of the assigned BitmapDrawables.
Do you know if there is a way, apart from redrawing it, to display a Bitmap in an ImageView scaled to fit but with the correct aspect ratio? The closest seems to be Gravity.FILL but that changes the aspect ratio to that of the ImageView so distorting the image.
It doesn't work as expected on your FlickrViewer when I change the ImageView gravities in the Designer. I assume this is because you assign a new BitmapDrawable to the ImageView in the program. To get it to work I need to change the gravity of the assigned BitmapDrawables.
That is correct. When you assign a new BitmapDrawable it gets erased.
Do you know if there is a way, apart from redrawing it, to display a Bitmap in an ImageView scaled to fit but with the correct aspect ratio? The closest seems to be Gravity.FILL but that changes the aspect ratio to that of the ImageView so distorting the image.
You can load the Bitmap with LoadBitmapScaled. It will make the bitmap smaller and will keep the correct aspect ratio.
You can also change the ImageView size based on the bitmap size.