package com.prankapp.fartsounds.airhorn.adapterdfds;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.prankapp.fartsounds.airhorn.R;
import com.prankapp.fartsounds.airhorn.model.PrankListModel;

import java.util.List;

public class PrankListAdapter extends BaseQuickAdapter<PrankListModel, BaseViewHolder> {

    public PrankListAdapter(int layoutResId, List<PrankListModel> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PrankListModel item) {
        ImageView image = helper.getView(R.id.prank_image);
        TextView tv_titleff = helper.getView(R.id.tv_titleff);
        Glide.with(mContext)
                .load(item.getCategoryUrl())
                .into(image);
        tv_titleff.setText(item.getCategoryName());
    }
}
