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

import android.view.ViewGroup;
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 java.util.Random;

public class RVEnthusiastAdapter extends BaseQuickAdapter<String, BaseGlideHolder> {

    public RVEnthusiastAdapter() {
        super(R.layout.rv_item_rv_enthusiast);
    }

    @Override
    protected void convert(BaseGlideHolder helper, String string) {
        GlideManager.getInstance(mContext).loadImage(string,  (ImageView)helper.getView(R.id.iv_activity));

//        ViewGroup.LayoutParams layoutParams = helper.getView(R.id.ll_item_rv_enthusiast).getLayoutParams();
//        layoutParams.height = new Random().nextInt(200)+500;
//        helper.getView(R.id.ll_item_rv_enthusiast).setLayoutParams(layoutParams);
    }
}
