RecyclerView解决视图全部挤到左边的问题

来源:互联网 发布:破解网络摄像头ip软件 编辑:程序博客网 时间:2024/05/16 08:20

问题:

视图全部挤到左边的问题;

解决方法:

把代码:

View view = LayoutInflater.from(mContext).inflate(R.layout.item_sync_chengji,null);
修改为:

      

View view = LayoutInflater.from(mContext).inflate(R.layout.item_sync_chengji,parent,false);

问题解决。

网上类似的问题如下:里面有原因解答。

点击打开链接

http://www.zhihu.com/question/30906105

0 0
原创粉丝点击