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

后端 未结 5 1638
萌比男神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:22

    Use ImageButton

       
    

    Use drawable selector to ImageButton and define your properties

    
        
            
            
            
        
    
    
    
        
            
            
            
        
    
    
            
        
            
            
            
        
        
    

提交回复
热议问题