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