How to disable the shadow around card view in android

后端 未结 12 1804
陌清茗
陌清茗 2021-02-01 11:34

Hello I am am working on demo application in which i am using the card view of support library. By default it is adding shadow around it. I want to remove this shadow & shou

12条回答
  •  遇见更好的自我
    2021-02-01 12:27

    In my case, only setting of background alpha with suggested elevation and backgroundColor hide shadow border:

     this.setCardElevation(0);
     this.setCardBackgroundColor(getContext().getResources().getColor(android.R.color.transparent));
     this.getBackground().setAlpha(0);
    

提交回复
热议问题