// Path: app/src/main/java/com/tyq/jiemian/bean/ChatBean.java
// public class ChatBean {
//     private int type;
//     private String info;
// 
//     public ChatBean(int type, String info) {
//         this.type = type;
//         this.info = info;
//     }
// 
//     public String getInfo() {
//         return info;
//     }
// 
//     public void setInfo(String info) {
//         this.info = info;
//     }
// 
//     public int getType() {
//         return type;
//     }
// 
//     public void setType(int type) {
//         this.type = type;
//     }
// }


import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.tyq.jiemian.R;
import com.tyq.jiemian.bean.ChatBean;
import java.util.ArrayList;
import java.util.List;
    @Override
    public int getCount() {
        return list == null ? 0 : list.size();
    }

    @Override
    public Object getItem(int position) {
        return list.get(position);
    }

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

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder viewHolder;
        if (convertView == null) {
            viewHolder = new ViewHolder();

            if (getItemViewType(position) == TYPE_USER) {
                convertView = LayoutInflater.from(mContext).inflate(R.layout.item_trc, parent, false);
                viewHolder.textView = (TextView) convertView.findViewById(R.id.item_trc_txt);
            } else {
                convertView = LayoutInflater.from(mContext).inflate(R.layout.item_trc_robot, parent, false);
                viewHolder.textView = (TextView) convertView.findViewById(R.id.item_trc_robot_txt);
            }

            convertView.setTag(viewHolder);
// Path: app/src/main/java/com/tyq/jiemian/bean/ChatBean.java
// public class ChatBean {
//     private int type;
//     private String info;
// 
//     public ChatBean(int type, String info) {
//         this.type = type;
//         this.info = info;
//     }
// 
//     public String getInfo() {
//         return info;
//     }
// 
//     public void setInfo(String info) {
//         this.info = info;
//     }
// 
//     public int getType() {
//         return type;
//     }
// 
//     public void setType(int type) {
//         this.type = type;
//     }
// }


// Path: app/src/main/java/com/tyq/jiemian/adapter/TRClientAdapter.java
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.tyq.jiemian.R;
import com.tyq.jiemian.bean.ChatBean;
import java.util.ArrayList;
import java.util.List;

    @Override
    public int getCount() {
        return list == null ? 0 : list.size();
    }

    @Override
    public Object getItem(int position) {
        return list.get(position);
    }

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

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder viewHolder;
        if (convertView == null) {
            viewHolder = new ViewHolder();

            if (getItemViewType(position) == TYPE_USER) {
                convertView = LayoutInflater.from(mContext).inflate(R.layout.item_trc, parent, false);
                viewHolder.textView = (TextView) convertView.findViewById(R.id.item_trc_txt);
            } else {
                convertView = LayoutInflater.from(mContext).inflate(R.layout.item_trc_robot, parent, false);
                viewHolder.textView = (TextView) convertView.findViewById(R.id.item_trc_robot_txt);
            }

            convertView.setTag(viewHolder);
        } else {