在RecyclerView中宽度设置了match_parent,但是效果和wrap_content一样;

说下解决方法:

1、这样子写,match_parent没有效果;

View v = View.inflate(context,R.layout.item_service_manage,null);

2、这样子写,match_parent设置生效;推荐这样写。

LayoutInflater.from(context).inflate(R.layout.item_service_manage, parent, false)
有空再来说一下源码,先去撸代码了;
posted on 2018-05-21 11:37  香蕉你个博纳纳  阅读(762)  评论(0)    收藏  举报