package com.yidianling.course;

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

import com.yidianling.course.coursePlay.moudle.Course;
import com.yidianling.ydlcommon.adapter.CommonAdapter;

/**
 * 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;
    }
}
