public class MyListAdapter2 extends RecyclerView.Adapter<MyListHolder2> { private List<GoodsBean.MiaoshaBean.ListBeanX> list; private Context context; public MyListAdapter2(List<GoodsBean.MiaoshaBean.ListBeanX> list, Context context) { this.list = list; this.context = context; } @Override public MyListHolder2 onCreateViewHolder(ViewGroup parent, int viewType) { View view = View.inflate(context, R.layout.list_item2, null); MyListHolder2 myListHolder2=new MyListHolder2(view); return myListHolder2; } @Override public void onBindViewHolder(MyListHolder2 holder, int position) { String s= list.get(position).getImages().split("\\|")[0]+""; Glide.with(context).load(s).into(holder.image02); } @Override public int getItemCount() { return list.size(); } }
MyListAdapter2
最新推荐文章于 2024-03-28 04:52:43 发布