package com.kfzs.duanduan.adp;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.sheep.jiuyan.samllsheep.R;
import com.kfzs.duanduan.utils.InstallButtonUtils;
import com.kfzs.duanduan.utils.dlg.SkipUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * @ Created by Dlg
 * @ <p>TiTle:  BaseAdpterWithDownBtn</p>
 * @ <p>Description:搜索页有下载按钮的BaseAdapter统一处理</p>
 * @ date:  2017/8/3 18:19
 * @ QQ:    315096953
 */

public class BaseAdpterWithDownBtn extends BaseAdapter {

    private Map<String, InstallButtonUtils> mInstallButtonMgrMap = new HashMap<>();
    protected Context mContext;

    //养成习惯最好不要暂用默认TAG
    protected final static int TAG_ID = R.id.view_tag_down_btn;


    @Override
    public int getCount() {
        return 0;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        return null;
    }

    public Map<String, InstallButtonUtils> getmInstallButtonMgrMap() {
        return mInstallButtonMgrMap;
    }

    public void setmInstallButtonMgrMap(Map<String, InstallButtonUtils> mInstallButtonMgrMap) {
        this.mInstallButtonMgrMap = mInstallButtonMgrMap;
    }

    /**
     * 跳详情页的统一监听
     */
    protected View.OnClickListener cls_GoDetail = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            SkipUtils.getInstance().goGameDetails(mContext, (int) v.getTag(TAG_ID));
        }
    };
}
