How to implement an android:background that doesn't stretch?

前端 未结 11 1180
太阳男子
太阳男子 2020-11-28 02:51

I found this great thread describing how to \"eat the cake and have it too\", i.e. use image for a Button instead of ImageButton (which doesn\'t al

11条回答
  •  孤街浪徒
    2020-11-28 03:47

    Simply using ImageButton instead of Button fixes the problem.

    
    

    and you can set

    android:background="@null"
    

    to remove button background if you want.

    Quick Fix !! :-)

提交回复
热议问题