package com.prankapp.fartsounds.airhorn.adapterdfds;

import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

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 MineLikeAdapter extends BaseQuickAdapter<PrankListModel, BaseViewHolder> {

    public MineLikeAdapter(int layoutResId, @Nullable List<PrankListModel> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, PrankListModel item) {
        ImageView imageView = helper.getView(R.id.iv_like);
        Glide.with(mContext).load(item.getCategoryUrl()).into(imageView);
        TextView textView = helper.getView(R.id.tv_like_title);
        textView.setText(item.getCategoryName());
        helper.addOnClickListener(R.id.iv_delete);
    }
}
