How to make the corners of a button round?

前端 未结 13 786
暖寄归人
暖寄归人 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:29

    if you are using vector drawables, then you simply need to specify a element in your drawable definition. I have covered this in a blog post.

    If you are using bitmap / 9-patch drawables then you'll need to create the corners with transparency in the bitmap image.

提交回复
热议问题