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.course.widget.CourseItemNewView;
import com.yidianling.ydlcommon.adapter.CommonAdapter;

public class CourseNewListAdapter extends CommonAdapter<Course> {

    private Context context;

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

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