Adding a colored shadow to a Button

前端 未结 3 1502
失恋的感觉
失恋的感觉 2021-01-20 05:21

I need to add a shadow to a Button with these attributes \"from zelplin\":

and this is the design

I tried this code



        
3条回答
  •  遇见更好的自我
    2021-01-20 05:51

    Thanks to Taras I have solution. You can use this library for creating colored shadow to button. Just place your view element inside shadow layout. Of course basic layout is ConstraintLayout. Some pieces of code for example

     
    
        
    
    
    

    Button shape :

      
       
        
        
            
            
        
    
    

    Result:

提交回复
热议问题