Using RecyclerView with Card

后端 未结 3 1759
醉话见心
醉话见心 2021-02-13 19:01

I have some RecyclerView with Card items. And on preLollipop devices it looks fine. But on Lollipop it looks without any spacing between child cards. I tried to use margin and p

3条回答
  •  隐瞒了意图╮
    2021-02-13 19:25

    This is happening because on L, shadows are outside the the View bounds but pre-L, they are inside the View (unfortunately there is no real shadow support pre-L).

    If you want CardView to have same spacing on L as well, set cardUseCompatPadding to true.

提交回复
热议问题