I'm working with the 71x96 png files.
I started with the 320x480 default layout and an ImageView1 created in the designer with Width = 71 and Height = 96. I created a new variant of 480x800 to more closely match that of my device. When I did that, the designer changed the dimensions of ImageView1 to 105x144. I guess that makes sense given that I was going from a scale of 1 to a scale of 1.5. In the attached screenshot this is the upper-left image (the image is added in the Activity_Create sub).
Where things get a bit strange is when I created ImageView2 in the new layout with dimensions of 71x96. Despite the fact that in the designer gravity=fill, when I run the code loading the same image into ImageView1 and ImageView2, I get a "zoomed-in" image (see upper-right image in screenshot).
Keeping both ImageViews for reference, in the designer I created ImageView3 at 71x96, and in the Activity_Create sub I added ImageView3.Gravity = Gravity.Fill, resulting in the proper display which can be seen in the bottom-left image. But why was this statement necessary when Gravity was already set to Fill in the designer?
Curiously, I added ImageView4 in the designer (71x96) and preloaded the image in the designer itself, rather than adding it by code. Now when I run the program it displays correctly without my having to specify ImageView4.Gravity = Gravity.Fill (bottom-right image).
This behavior seems a bit odd to me.
I started with the 320x480 default layout and an ImageView1 created in the designer with Width = 71 and Height = 96. I created a new variant of 480x800 to more closely match that of my device. When I did that, the designer changed the dimensions of ImageView1 to 105x144. I guess that makes sense given that I was going from a scale of 1 to a scale of 1.5. In the attached screenshot this is the upper-left image (the image is added in the Activity_Create sub).
Where things get a bit strange is when I created ImageView2 in the new layout with dimensions of 71x96. Despite the fact that in the designer gravity=fill, when I run the code loading the same image into ImageView1 and ImageView2, I get a "zoomed-in" image (see upper-right image in screenshot).
Keeping both ImageViews for reference, in the designer I created ImageView3 at 71x96, and in the Activity_Create sub I added ImageView3.Gravity = Gravity.Fill, resulting in the proper display which can be seen in the bottom-left image. But why was this statement necessary when Gravity was already set to Fill in the designer?
Curiously, I added ImageView4 in the designer (71x96) and preloaded the image in the designer itself, rather than adding it by code. Now when I run the program it displays correctly without my having to specify ImageView4.Gravity = Gravity.Fill (bottom-right image).
This behavior seems a bit odd to me.