How to show shadow around the linearlayout in Android?

前端 未结 13 2507
名媛妹妹
名媛妹妹 2020-11-27 10:51

How can I show shadow for my linear layout. I want white colored rounded background with shadow around the linearlayout. I have done this so far.



        
13条回答
  •  北海茫月
    2020-11-27 11:22

    There is also another solution to the problem by implementing a layer-list that will act as the background for the LinearLayoout.

    Add background_with_shadow.xml file to res/drawable. Containing:

    
    
        
            
            
            
            
        
        
            
            
            
            
        
    
    

    Then add the the layer-list as background in your LinearLayout.

    
    

提交回复
热议问题