Android - Image Button Scale

后端 未结 3 2007
无人共我
无人共我 2020-12-08 10:50

I am trying to fit an image inside an ImageButton for testing but the way the ImageButtonbehaves is not as expected.

initially, I made a

3条回答
  •  情话喂你
    2020-12-08 11:28

    You should also check if there is any padding set around your imageButton, I created one that looked very similar to use and although fitXY worked, changing the size of the image became very confusing error-prone. However I then realized that there was 100p padding around all of the image hence the border being 100 dp away at each edge of the image.

提交回复
热议问题