Android recyclerview 只显示一行 宽度不适配

最近学习recyclerview 遇到的问题

1.宽度不适配

正确写法

LayoutInflater.from(context).inflate(R.layout.item_view,parent,false);

错误写法

LayoutInflater.from(context).inflate(R.layout.item_view,null);

2 只显示一行

itemView中父 view  写成wrap_content ;

posted @ 2018-05-16 12:58  星辰之力  阅读(495)  评论(0编辑  收藏  举报