Drawable as Background for CardView

后端 未结 11 966
傲寒
傲寒 2020-12-08 02:29

the CardView ( android.support.v7.cardview ) stays white even though I set a backround drawable via android:backround - The documentation gives me the feeling that it should

11条回答
  •  自闭症患者
    2020-12-08 02:55

    You can use LinearLayout or Relative layout inside CardView and set drawable background it like below :

    
    
        
    
            
    
            
    
            
        
    
    
    

    Below is my Drawable resource file :

    
    
    
    
    
    

提交回复
热议问题