recyclerView item 宽度不能撑满

  1. View.inflate(mContext, R.layout.item_layout, null);  
  2. 在这种情况下会出现宽度match不起效;
  3. 需要使用LayoutInflater.from(mContext).inflate(R.layout.item_layout, parent, false);  

猜你喜欢

转载自blog.csdn.net/cdye_1234/article/details/69299669
今日推荐