How to make the corners of a button round?

前端 未结 13 924
暖寄归人
暖寄归人 2020-11-22 16:36

I want to make the corners of a button round. Is there an easy way to achieve this in Android?

13条回答
  •  难免孤独
    2020-11-22 17:17

    Create an XML file like below one. Set it as background for the button. Change the radius attribute to your wish, if you need more curve for the button.

    button_background.xml

    
        
        
    
    

    Set background to your button:

提交回复
热议问题