package com.xxfc.discovery.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ruiwenliu.wrapper.util.glide.GlideApp;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.xxfc.discovery.R;
import com.xxfc.discovery.bean.beam.VideoBean;

/**
 * 短视频
 */

public class DiscoveryVideoAdapter extends BaseQuickAdapter<VideoBean, BaseViewHolder> {

    public DiscoveryVideoAdapter() {
        super(R.layout.rv_item_discovery_video);
    }

    @Override
    protected void convert(BaseViewHolder helper, VideoBean item) {
        if (item == null) {
            return;
        }
        GlideApp.with(mContext)
                .load(item.getThumb())
                .placeholder(android.R.color.white)
                .into((ImageView) helper.getView(R.id.thumb));

        helper.addOnClickListener(R.id.ll_item_video_comment);
        helper.addOnClickListener(R.id.ll_item_video_share);
    }
}
