package com.yutou.jianr_mg.Adapters;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.yutou.jianr_mg.R;
import com.yutou.jianr_mg.Tools.Utils;

import org.json.JSONObject;

import java.util.Map;

import cn.lemon.view.adapter.BaseViewHolder;
import cn.lemon.view.adapter.RecyclerAdapter;

public class WarLogAdapter extends RecyclerAdapter<Map> {
    private ImageLoader loader;
    public WarLogAdapter(Context context) {
        super(context);
        loader= Utils.initImageLoader(context);
    }

    @Override
    public BaseViewHolder<Map> onCreateBaseViewHolder(ViewGroup parent, int viewType) {
        return new MyHolder(parent, R.layout.item_team);
    }
    class MyHolder extends BaseViewHolder<Map>{
        TextView title, hp, hpMax;
        ImageView icon, icon_, item1, item2, item3, item4;
        ProgressBar hpBar;
        LinearLayout hpLayout;
        MyHolder(ViewGroup parent, int layoutId) {
            super(parent, layoutId);
            hp =findViewById(R.id.hp);
            hpMax =findViewById(R.id.hpMax);
            hpBar =findViewById(R.id.itemHp);
            title =findViewById(R.id.title);
            icon =findViewById(R.id.icon);
            icon_ =findViewById(R.id.icon_);
            item1 =findViewById(R.id.item1);
            item2 =findViewById(R.id.item2);
            item3 =findViewById(R.id.item3);
            item4 =findViewById(R.id.item4);
            hpLayout=findViewById(R.id.hpLayout);
        }

        @Override
        public void setData(Map data) {
            super.setData(data);
            JSONObject item= (JSONObject) data.get("");
        }
    }
}
