// Path: app/src/main/java/com/leelit/stuer/base_adapters/BaseListAdapter.java
// public abstract class BaseListAdapter<VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> {
//     protected OnItemClickListener mOnItemClickListener;
// 
//     public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
//         mOnItemClickListener = onItemClickListener;
//     }
// 
//     public interface OnItemClickListener {
//         void onItemClick(View view, int position);
//     }
// 
//     public abstract void removeData(int position);
// }


import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.leelit.stuer.R;
import com.leelit.stuer.base_adapters.BaseListAdapter;
import java.util.List;
import butterknife.ButterKnife;
import butterknife.InjectView;
package com.leelit.stuer.module_stu;





/**
 * Created by Leelit on 2016/3/3.
 */
public class StuAdapter extends BaseListAdapter<StuAdapter.ViewHolder> {

    private List<String> mTitleList;
    private int[] mIcon;

    public StuAdapter(List<String> titleList) {
        mTitleList = titleList;
        mIcon = new int[]{R.drawable.module_net_bangong, R.drawable.module_net_xuefenzhi, R.drawable.module_stu_mystu, R.drawable.module_net_youxiang, R.drawable.module_net_shudian, R.drawable.module_net_tushuguan, R.drawable.module_net_dianhua, R.drawable.module_net_baishitong};
    }

    @Override
    public void removeData(int position) {

    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.recycler_stu, parent, false));
    }


    @Override
    public void onBindViewHolder(final ViewHolder holder, int position) {
        holder.mTextViewTitle.setText(mTitleList.get(position));
        holder.mIcon.setImageResource(mIcon[position]);
        if (mOnItemClickListener != null) {
            holder.mCardView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
// Path: app/src/main/java/com/leelit/stuer/base_adapters/BaseListAdapter.java
// public abstract class BaseListAdapter<VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> {
//     protected OnItemClickListener mOnItemClickListener;
// 
//     public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
//         mOnItemClickListener = onItemClickListener;
//     }
// 
//     public interface OnItemClickListener {
//         void onItemClick(View view, int position);
//     }
// 
//     public abstract void removeData(int position);
// }


// Path: app/src/main/java/com/leelit/stuer/module_stu/StuAdapter.java
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.leelit.stuer.R;
import com.leelit.stuer.base_adapters.BaseListAdapter;
import java.util.List;
import butterknife.ButterKnife;
import butterknife.InjectView;

package com.leelit.stuer.module_stu;





/**
 * Created by Leelit on 2016/3/3.
 */
public class StuAdapter extends BaseListAdapter<StuAdapter.ViewHolder> {

    private List<String> mTitleList;
    private int[] mIcon;

    public StuAdapter(List<String> titleList) {
        mTitleList = titleList;
        mIcon = new int[]{R.drawable.module_net_bangong, R.drawable.module_net_xuefenzhi, R.drawable.module_stu_mystu, R.drawable.module_net_youxiang, R.drawable.module_net_shudian, R.drawable.module_net_tushuguan, R.drawable.module_net_dianhua, R.drawable.module_net_baishitong};
    }

    @Override
    public void removeData(int position) {

    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.recycler_stu, parent, false));
    }


    @Override
    public void onBindViewHolder(final ViewHolder holder, int position) {
        holder.mTextViewTitle.setText(mTitleList.get(position));
        holder.mIcon.setImageResource(mIcon[position]);
        if (mOnItemClickListener != null) {
            holder.mCardView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    int pos = holder.getLayoutPosition();