How to change a button's shape using xml or using java?

前端 未结 2 1684
故里飘歌
故里飘歌 2021-01-05 07:10

I want to make a custom button with shape, how to do this?

2条回答
  •  臣服心动
    2021-01-05 07:36

    This is the sample button which is of oval shape.. The gradient says the start n end color along with the angle. corners for the oval shape..Try this.. Mention the name of this xml in button background android:background="@drawable/sample".Save the xml in drawable.

    
        
        
        
    
    
    

    Also check this link for custom button.

提交回复
热议问题