I have image (340 x 187), iam scaling it to (100 x 100) then my image dimensions are (100 x 55). But when iam fitting this image to Image button (100 x 100) again it is stretching.
but my image size is 100 x 55 should fit in 100 x 100 image button and remaining height (45) should be blank with dark color. Please help me .
Thanks in advance
Hi,
According to your description, you don't want the imagebutton to scale the image's size. I searched some threads, we can use property to fix the width and height, the properties are layout_height and layout_width.
There are simialr threads, please refer to the link below:
http://stackoverflow.com/questions/15139751/imagebutton-stretching-background-image
Hope it's useful for you.
Best Regards,
Michelle Ge
沒有留言:
張貼留言