How to add shadow on CardView aligned to bottom of parent

前端 未结 4 740
闹比i
闹比i 2020-12-13 15:57

I have a CardView aligned bottom to screen, destpite the elevation I want to add more shadow to top of the CardView. I\'ve tried with

  android:shadowColor=         


        
4条回答
  •  无人及你
    2020-12-13 16:20

    You can use the following XML as the background of layout for shadow

    use shadow_background.xml in layout

      
      
    

    shadow_background.xml

    
    
    
        
            
            
            
        
    
    
        
            
            
            
        
    
    
        
            
            
            
        
    
    
        
            
             
            
        
    
    
        
            
            
            
        
    
    
        
            
            
            
        
    
    
        
    
            
            
            
        
    
    
    
    
        
            
            
        
    
    

提交回复
热议问题