Using RecyclerView with Card

后端 未结 3 1764
醉话见心
醉话见心 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:40

    yigit's answer was helpful but didn't have much detail so I'm adding some here for future viewers of this post.

    Here is an example of how I got this working (not obvious from linked android site in yigit's answer).

    
    
        // Other layouts and views here
    
    
    

    The card_view needing an underscore and to use the res-auto schema wasn't obvious.

    There is a good example of this in the Material Design Training.

提交回复
热议问题