// Path: BossTransfer/app/src/main/java/com/example/arial/bosstransfer/core/AbsOrdinaryAdapter.java
// public abstract class AbsOrdinaryAdapter<T, ViewHolder extends AbsOrdinaryViewHolder> extends BaseAdapter {
//     private LayoutInflater mInflater;
//     protected List<T> mData;
//     private Context mContext;
// 
//     public AbsOrdinaryAdapter(Context context, List<T> data) {
//         mInflater = LayoutInflater.from(context);
//         mData = data;
//         mContext = context;
//     }
// 
//     protected Context getContext() {
//         return mContext;
//     }
// 
//     /**
//      * item 的type
//      *
//      * @param type
//      * @return
//      */
//     protected abstract int setLayoutId(int type);
// 
//     @Override
//     public int getCount() {
//         return mData.size();
//     }
// 
//     @Override
//     public T getItem(int position) {
//         return mData.get(position);
//     }
// 
//     @Override
//     public long getItemId(int position) {
//         return 0;
//     }
// 
//     public abstract void bindData(int position, ViewHolder helper, T item);
// 
//     public abstract ViewHolder getViewHolder(View convertView);
// 
//     @Override
//     public View getView(int position, View convertView, ViewGroup parent) {
//         ViewHolder viewHolder;
//         if (convertView == null) {
//             convertView = mInflater.inflate(setLayoutId(getItemViewType(position)), null);
//             viewHolder = getViewHolder(convertView);
//             convertView.setTag(viewHolder);
//         } else {
//             viewHolder = (ViewHolder) convertView.getTag();
//         }
//         bindData(position, viewHolder, mData.get(position));
//         return convertView;
//     }
// }
// 
// Path: BossTransfer/app/src/main/java/com/example/arial/bosstransfer/core/AbsOrdinaryViewHolder.java
// public abstract class AbsOrdinaryViewHolder {
//     public AbsOrdinaryViewHolder(View view) {
//         ButterKnife.inject(this, view);
//     }
// }


import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.example.arial.bosstransfer.R;
import com.example.arial.bosstransfer.core.AbsOrdinaryAdapter;
import com.example.arial.bosstransfer.core.AbsOrdinaryViewHolder;
import java.util.List;
import butterknife.InjectView;
package com.example.arial.bosstransfer.boss;





/**
 * Created by AriaL on 2016/2/22.
 */
public class BossAdapter extends AbsOrdinaryAdapter<BossEntity, BossAdapter.BossHolder> {

    public BossAdapter(Context context, List<BossEntity> data) {
        super(context, data);
    }

    @Override
    protected int setLayoutId(int type) {
        return R.layout.item_boss;
    }

    @Override
    public void bindData(int position, BossHolder helper, BossEntity item) {
        Glide.with(getContext()).load(item.getImg()).into(helper.img);
        helper.titile.setText(item.getTitle());
    }

    @Override
    public BossHolder getViewHolder(View convertView) {
        return new BossHolder(convertView);
    }

// Path: BossTransfer/app/src/main/java/com/example/arial/bosstransfer/core/AbsOrdinaryAdapter.java
// public abstract class AbsOrdinaryAdapter<T, ViewHolder extends AbsOrdinaryViewHolder> extends BaseAdapter {
//     private LayoutInflater mInflater;
//     protected List<T> mData;
//     private Context mContext;
// 
//     public AbsOrdinaryAdapter(Context context, List<T> data) {
//         mInflater = LayoutInflater.from(context);
//         mData = data;
//         mContext = context;
//     }
// 
//     protected Context getContext() {
//         return mContext;
//     }
// 
//     /**
//      * item 的type
//      *
//      * @param type
//      * @return
//      */
//     protected abstract int setLayoutId(int type);
// 
//     @Override
//     public int getCount() {
//         return mData.size();
//     }
// 
//     @Override
//     public T getItem(int position) {
//         return mData.get(position);
//     }
// 
//     @Override
//     public long getItemId(int position) {
//         return 0;
//     }
// 
//     public abstract void bindData(int position, ViewHolder helper, T item);
// 
//     public abstract ViewHolder getViewHolder(View convertView);
// 
//     @Override
//     public View getView(int position, View convertView, ViewGroup parent) {
//         ViewHolder viewHolder;
//         if (convertView == null) {
//             convertView = mInflater.inflate(setLayoutId(getItemViewType(position)), null);
//             viewHolder = getViewHolder(convertView);
//             convertView.setTag(viewHolder);
//         } else {
//             viewHolder = (ViewHolder) convertView.getTag();
//         }
//         bindData(position, viewHolder, mData.get(position));
//         return convertView;
//     }
// }
// 
// Path: BossTransfer/app/src/main/java/com/example/arial/bosstransfer/core/AbsOrdinaryViewHolder.java
// public abstract class AbsOrdinaryViewHolder {
//     public AbsOrdinaryViewHolder(View view) {
//         ButterKnife.inject(this, view);
//     }
// }


// Path: BossTransfer/app/src/main/java/com/example/arial/bosstransfer/boss/BossAdapter.java
import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.example.arial.bosstransfer.R;
import com.example.arial.bosstransfer.core.AbsOrdinaryAdapter;
import com.example.arial.bosstransfer.core.AbsOrdinaryViewHolder;
import java.util.List;
import butterknife.InjectView;

package com.example.arial.bosstransfer.boss;





/**
 * Created by AriaL on 2016/2/22.
 */
public class BossAdapter extends AbsOrdinaryAdapter<BossEntity, BossAdapter.BossHolder> {

    public BossAdapter(Context context, List<BossEntity> data) {
        super(context, data);
    }

    @Override
    protected int setLayoutId(int type) {
        return R.layout.item_boss;
    }

    @Override
    public void bindData(int position, BossHolder helper, BossEntity item) {
        Glide.with(getContext()).load(item.getImg()).into(helper.img);
        helper.titile.setText(item.getTitle());
    }

    @Override
    public BossHolder getViewHolder(View convertView) {
        return new BossHolder(convertView);
    }

    protected class BossHolder extends AbsOrdinaryViewHolder {