How to make Floating Action Button background Gradient?

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

The code for FAB:



        
7条回答
  •  时光取名叫无心
    2020-12-30 12:25

    This method works also. Create a shape called fab_background.xml in drawable where you can do all the customization you want

    
    
        
        
    
    

    Create a layout called custom_fab.xml in layout then set the backround and fab icon using the image view

    
    
    
        
    
    

    You can then reference it using include

    Example

    
    
    
    
    
        
    
    

提交回复
热议问题