I have encountered it before, View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.content_item,parent,false); Just change it to bind cardview like this. This is how I solved it. I hope it can be helpful to you. Not helpful http://m.blog.csdn.net/article/details?id=51108390
OnCreateViewholder writes:
Inflater.inflate(r.layout.xxx,container,false).
Post your adapter and oncreateviewholder code. When you look at inflate, there are 3 parameters.
Check the width setting of your recyclerview
I have encountered it before, View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.content_item,parent,false); Just change it to bind cardview like this. This is how I solved it. I hope it can be helpful to you. Not helpful
http://m.blog.csdn.net/article/details?id=51108390