SystemMsgAdapter.java 800 Bytes
Newer Older
konghaorui committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
package com.yidianling.im.ui.adapter;

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

import com.yidianling.im.bean.SystemMsgBean;
import com.yidianling.im.ui.view.SystemItemView;
import com.ydl.ydlcommon.adapter.CommonAdapter;


/**
 * Created by jinkai on 16/5/13.
 */
public class SystemMsgAdapter extends CommonAdapter<SystemMsgBean> {

    private Context context;

    public SystemMsgAdapter(Context context) {
        this.context = context;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        if (convertView == null) {
            convertView = new SystemItemView(context);
        }
        ((SystemItemView) convertView).setData(mDataList.get(position));
        return convertView;
    }
}