Remove background from ImageCardView

后端 未结 2 568
遇见更好的自我
遇见更好的自我 2021-01-23 09:39

I started using new android.support.v17.leanback library and have some trouble in styling ImageCardView.

I am changing the image on Imag

相关标签:
2条回答
  • 2021-01-23 10:13

    Your problem is not about the CardView itself, it's about your presenter. Put this line your RowPresenter/ListRowPresenter:

    listRowPresenter.setShadowEnabled(false);
    

    Furthermore, in this Medium article you can see how to make you CardView circular. And where it shows how to remove the shadow when the row is not focused, overriding the isUsingDefaultListSelectEffect() method to be always false.

    0 讨论(0)
  • 2021-01-23 10:25

    According to this post, you cannot change the background drawable, only the color.

    You can try

    public void setBackground (Drawable background)
    -Set the background to a given Drawable, or remove the background
    
    0 讨论(0)
提交回复
热议问题