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

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.frame.base.glide.GlideManager;
import com.ruiwenliu.wrapper.util.BaseGlideHolder;
import com.rv.home.R;
import com.rv.home.R2;
import com.rv.travel.bean.BeanHot;

/**
 * Created :Auser
 * Date: 2019/5/17.
 * Desc:热门车型适配
 */

public class HotCarTypeAdapter extends BaseQuickAdapter<BeanHot,BaseGlideHolder>{
    public HotCarTypeAdapter() {
        super(R.layout.rv_item_hot_car_type);
    }

    @Override
    protected void convert(BaseGlideHolder helper, BeanHot bean) {
        GlideManager.getInstance(mContext).loadImage(bean.getImg(),  (ImageView)helper.getView(R.id.iv_goods));
//        helper.loadRoundImage(mContext,bean.getImg(), (ImageView) helper.getView(R.id.iv_goods),10);
        helper.setText(R.id.tv_name,bean.getName());
        helper.setText(R.id.tv_content,"c1、烧烤、麻将、微波炉");
        helper.setText(R.id.tv_price,String.format("￥%1$s%2$s","1000",mContext.getString(R.string.rv_day)));
    }


    @Override
    public int getItemCount() {
        return 4;
    }
}
