一.问题解决:
在adapter的onCreateViewHolder()中做以下处理:
正常写法:
View view = View.inflate(parent.getContext(),R.xxx,null);
修改成:
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.xxx,parent,false);
正常写法:
View view = View.inflate(parent.getContext(),R.xxx,null);
修改成:
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.xxx,parent,false);
本文标题:解决RecyclerView布局使用match_parent,i
本文链接:https://www.haomeiwen.com/subject/mckldxtx.html
网友评论