android - 在RecyclerView布局使用CardView不能match_parent
本文介绍了android - 在RecyclerView布局使用CardView不能match_parent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
结果跑到程序里是这样的::
不能定义宽高,不能让它的宽match,怎么回事?
解决方案
OnCreateViewholder里这么写:
Inflater.inflate(r.layout.xxx,container,false).
这篇关于android - 在RecyclerView布局使用CardView不能match_parent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文