I Inman Well-Known Member Licensed User Longtime User Apr 17, 2013 #1 Here is something that is puzzling me for the last couple of days. I have an ImageView, the gravity of which is set to Center. Now if I load an image with the same width as that of the imageview, shouldn't it display the complete width of the image, irrespective of its height? Because in my case that is not happening. It instead zooms and crops the image, displaying only a center portion, not the full width. I am using CreateScaledBitmap function given in the following page to make sure the bitmap is upscaled/downscaled to match the width of the imageview. http://www.b4x.com/forum/basic4android-updates-questions/20643-resizing-image.html#post119006
Here is something that is puzzling me for the last couple of days. I have an ImageView, the gravity of which is set to Center. Now if I load an image with the same width as that of the imageview, shouldn't it display the complete width of the image, irrespective of its height? Because in my case that is not happening. It instead zooms and crops the image, displaying only a center portion, not the full width. I am using CreateScaledBitmap function given in the following page to make sure the bitmap is upscaled/downscaled to match the width of the imageview. http://www.b4x.com/forum/basic4android-updates-questions/20643-resizing-image.html#post119006
Erel B4X founder Staff member Licensed User Longtime User Apr 17, 2013 #2 Gravity.Center should not affect the image size. Can you upload a small project that demonstrates this issue? Upvote 0
Gravity.Center should not affect the image size. Can you upload a small project that demonstrates this issue?
I Inman Well-Known Member Licensed User Longtime User Apr 18, 2013 #3 Nah, that is ok. I switched to UltimateListView and using Bitmap Plus library I cropped and resized the image to my needs, instead of setting Gravity. It was a big project too. Upvote 0
Nah, that is ok. I switched to UltimateListView and using Bitmap Plus library I cropped and resized the image to my needs, instead of setting Gravity. It was a big project too.