How to make Floating Action Button background Gradient?

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

The code for FAB:



        
7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-30 12:40

    I tried a bunch of different answers but all had their shortcomings or didn't work with the material FAB. When I realized this is not what it is meant for I simply replaced it with an ImageView. This works great and looks identical.

    
    

    fab_gradient.xml:

    
        
            
                
                    
                        
                    
                
                
            
        
    
    

提交回复
热议问题