簡單解決RecyclerView嵌套的RecyclerView條目顯示不全和寬度不能鋪滿
分類:Android
(1521)(2)
第一個RecyclerView的Adapter
[java]view plaincopy
@Override
publicMyHolder?onCreateViewHolder(ViewGroup?parent,intviewType)?{
View?view?=?LayoutInflater.from(parent.getContext()).inflate(R.layout.shop_item,null);?解決條目顯示不全
MyHolder?holder?=newMyHolder(view);
returnholder;
}
第二個RecyclerView的Adapter
[java]view plaincopy
@Override
publicMyHolder?onCreateViewHolder(ViewGroup?parent,intviewType)?{
View?view?=?LayoutInflater.from(parent.getContext()).inflate(R.layout.check_item,?parent,false);//解決寬度不能鋪滿
MyHolder?holder?=newMyHolder(view);
returnholder;
}