How to make Floating Action Button background Gradient?

后端 未结 7 2059
长情又很酷
长情又很酷 2020-12-30 12:00

The code for FAB:



        
7条回答
  •  感情败类
    2020-12-30 12:35

    Use a CardView instead with ripple effect:

    
    
        
    
            
    
        
    
    
    

    The above answers are not working with SVGs and you might also see stretched icons etc. This is a neat way I used for my app according to material design for fab:

    Tip: If it does not appear above the layer you want, play with the elevation attribute.

提交回复
热议问题