package com.rv.home.rv.module.ui.main.home.adapter;

import android.text.TextUtils;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ruiwenliu.wrapper.util.BaseGlideHolder;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.rv.home.R;
import com.rv.home.rv.module.ui.main.home.bean.SelectedActivitiesBean;

public class SelectedEventsAdapter extends BaseQuickAdapter<SelectedActivitiesBean.SelectedActivityItem, BaseGlideHolder> {

    public SelectedEventsAdapter() {
        super(R.layout.rv_item_selected_events);
    }

    @Override
    protected void convert(BaseGlideHolder helper, SelectedActivitiesBean.SelectedActivityItem item) {
//        GlideManager.getInstance(mContext).loadRoundImage(string,  (ImageView)helper.getView(R.id.iv_activity),6);
//        helper.setImageDrawable(R.id.iv_activity,mContext.getResources().getDrawable(integer));
        if(!TextUtils.isEmpty(item.getPicture())) {
            GlideManager.getInstance(mContext).loadRoundImage2(item.getPicture(), (ImageView) helper.getView(R.id.iv_activity), 6);
        }
    }
}
