LWGShane Well-Known Member Licensed User Longtime User Aug 5, 2015 #1 How do I prevent the ImageView from filling itself with an opened image? ImageView's created via code don't do this. Any ideas?
How do I prevent the ImageView from filling itself with an opened image? ImageView's created via code don't do this. Any ideas?
Erel B4X founder Staff member Licensed User Longtime User Aug 5, 2015 #2 Have you checked the Preserve Ratio option? Upvote 0
LWGShane Well-Known Member Licensed User Longtime User Aug 5, 2015 #3 @Erel: I figured out the problem: I'm so used to the image being centered that its default location threw me off. Is it possible to center the image? Upvote 0
@Erel: I figured out the problem: I'm so used to the image being centered that its default location threw me off. Is it possible to center the image?
Erel B4X founder Staff member Licensed User Longtime User Aug 6, 2015 #4 You can use a Pane instead of ImageView. Set the Drawable to BitmapDrawable and set the Gravity to Center. Upvote 0
You can use a Pane instead of ImageView. Set the Drawable to BitmapDrawable and set the Gravity to Center.
LWGShane Well-Known Member Licensed User Longtime User Aug 6, 2015 #5 @Erel: 1) Doesn't work. The ImageView isn't centered in the pane, even though the pane's gravity is set to "Center". 2) You can't add images via code to a pane. Upvote 0
@Erel: 1) Doesn't work. The ImageView isn't centered in the pane, even though the pane's gravity is set to "Center". 2) You can't add images via code to a pane.
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2015 #6 You should use a pane instead of ImageView. Set the image as the pane's background in the designer. Note that you can center an ImageView in a pane with a designer script. Upvote 0
You should use a pane instead of ImageView. Set the image as the pane's background in the designer. Note that you can center an ImageView in a pane with a designer script.