package com.yidianling.course;

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

import com.ydl.ydlcommon.adapter.CommonAdapter;
import com.yidianling.course.bean.Course;

/**
 * Created by zqk on 6/22/17.
 */

public class CourseListAdapter extends CommonAdapter<Course> {

    private Context context;

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

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = new CourseListItemView(context);
        }
        ((CourseListItemView) convertView).setData(mDataList.get(position));
        return convertView;
    }
}
