RecyclerView 里item的match_parent属性失效

item 使用 relativelayout 为根节点,并且 加载方式如下:

public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.list_item_wifi, parent, false);
return new WifiViewHolder(view);
}

具体参考:https://blog.csdn.net/overseasandroid/article/details/51840819
posted @ 2020-10-14 14:36  Jokeyyu  阅读(268)  评论(0编辑  收藏  举报