package com.danding.yang800.Adapter;


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

import com.danding.yang800.Entity.InviteNoteInfo;
import com.danding.yang800.Entity.SortListInfo;
import com.danding.yang800.R;
import com.zhy.autolayout.utils.AutoUtils;

public class InviteNoteAdapter extends MyBaseAdapter<InviteNoteInfo> {

    public InviteNoteAdapter(Context context) {
        super(context);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        Info info = null;
        if (convertView == null) {
            convertView = inflater.inflate(R.layout.invite_note_adapter, null);
            info = new Info();
            info.inviteAdapter_nameTv = (TextView) convertView.findViewById(R.id.inviteAdapter_nameTv);
            info.inviteAdapter_numberTv = (TextView) convertView.findViewById(R.id.inviteAdapter_numberTv);
            info.inviteAdapter_timeTv = (TextView) convertView.findViewById(R.id.inviteAdapter_timeTv);
            convertView.setTag(info);
            AutoUtils.autoSize(convertView);
        } else {
            info = (Info) convertView.getTag();
        }
        info.inviteAdapter_nameTv.setText(getItem(position).getName());
        info.inviteAdapter_numberTv.setText(getItem(position).getNumber());
        info.inviteAdapter_timeTv.setText(getItem(position).getTime());
        return convertView;
    }

    class Info {
        TextView inviteAdapter_nameTv;
        TextView inviteAdapter_numberTv;
        TextView inviteAdapter_timeTv;
    }

}
