how to make a capsule shape Button in android?

后端 未结 7 2008
一整个雨季
一整个雨季 2021-01-31 15:56

I want to make a button exactly like in this image

\"Capsule

I want to use a xml file that will us

7条回答
  •  南方客
    南方客 (楼主)
    2021-01-31 16:23

    consider customizing a shape to it and use corners inside that shape:

    
    
         
         
    
    
    

    So, save that shape in your /drawable folder, let's say it will be saved as "button_bg.xml", so when declaring the Button in your layout xml:

提交回复
热议问题