RecyclerView, ListView 只显示一行内容 问题解决

Adapter 中的data有多行,但是RecyclerView只显示一行。 

原因出在item的layout xml, 用了自动生成的RelativeLayout, 她的默认高度height属性是match_parent,占满了整个屏,改成wrap_content,就能显示所有行的内容了。

posted @ 2016-07-10 23:34  亲爱的村姑  阅读(1852)  评论(0编辑  收藏  举报