package com.sheep.gamegroup.view.adapter;

import android.content.Context;
import android.view.Gravity;
import android.view.View;

import com.sheep.gamegroup.model.entity.DialogConfig;
import com.sheep.gamegroup.model.entity.Welfare;
import com.sheep.gamegroup.util.ViewHolder;
import com.sheep.gamegroup.util.ViewUtil;
import com.sheep.jiuyan.samllsheep.R;

import java.util.List;

/**
 * Created by realicing on 2018/8/28.
 * realicing@sina.com
 */
public class GiftCenterAdapter extends AdbCommonRecycler<Welfare> implements View.OnClickListener {

    public GiftCenterAdapter(Context context, List<Welfare> list) {
        super(context, list);
    }

    @Override
    public int getViewIdByType(int type) {
        return R.layout.item_download_welfare;
    }

    @Override
    public void convert(ViewHolder holder, Welfare welfareCenter) {
        holder.itemView.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        ViewUtil.showMsgDialog(context, new DialogConfig().setTitle("礼包使用说明").setBtnLeftText("我知道了")
                .setMsgGravity(Gravity.START)//.setMsgLayoutWidth()
                .setMsg("礼包内容：\n元宝X1000、钻石X2000、符文X20\n\n使用方式：\n启动游戏---设置---激活兑换"));
    }
}
