Custom Buttons in Android: How to get border/edge/frame when I read the background from xml?

后端 未结 5 1639
萌比男神i
萌比男神i 2021-02-08 03:02

Using Android Shapes in xml I have defined a gradient which I use as the background for a button.

This all works nice, but there\'s no edge surrounding the button. I wou

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-08 03:25

    I've had the same problem, what i observed is stroke is not applying to button as border at design time but at run time i see the border.

    I jst used the following same code

    
    
        
        
    
    
    

    as steve hanley said abvoe you miss the android: for the color attribute.

    Hope this helps somebody....

提交回复
热议问题