Floating action button's shadow clipping at view margins

后端 未结 5 2201
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 21:53

I have a floating action button anchored to the bottom right of a coordinator layout. It is 16dp from the margins of the view (the margins are included by default and specif

5条回答
  •  一个人的身影
    2021-01-03 22:19

    I too had the same problem. But I couldn't just throw away my margin values for the sake of the FAB. So I added another layer in the hierarchy and this helped me get the FAB to be placed exactly where I wanted without disrupting the parent. So now I have a CoordinatorLayout inside a CoordinatorLayout for the sake of the FAB. The below is my modified layout file.

    
    
        
    
            
    
                
    
            
    
        
    
        
    
    
    

提交回复
热议问题