扫码关注官方订阅号
结果跑到程序里是这样的::
不能定义宽高,不能让它的宽match,怎么回事?
ringa_lee
OnCreateViewholder里这么写:Inflater.inflate(r.layout.xxx,container,false).
你的adapter,oncreateviewholder代码贴出来,看inflate的时候参数是3个不
看下你的recyclerview的宽度设置
之前遇过,View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.content_item,parent,false); 改成这样绑定cardview就可以了,我是这么解决的,希望对你有没有帮助http://m.blog.csdn.net/article/details?id=51108390
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
OnCreateViewholder里这么写:
Inflater.inflate(r.layout.xxx,container,false).
你的adapter,oncreateviewholder代码贴出来,看inflate的时候参数是3个不
看下你的recyclerview的宽度设置
之前遇过,View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.content_item,parent,false); 改成这样绑定cardview就可以了,我是这么解决的,希望对你有没有帮助
http://m.blog.csdn.net/article/details?id=51108390