@@ -0,0 +1,2421 @@
+package edu.rpi.cs.yacs.adapters;%0A%0Aimport android.support.v7.widget.RecyclerView;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0A%0Aimport java.util.List;%0A%0Aimport edu.rpi.cs.yacs.R;%0Aimport edu.rpi.cs.yacs.fragments.RecyclerViewFragment;%0Aimport edu.rpi.cs.yacs.models.Course;%0Aimport edu.rpi.cs.yacs.models.Sections;%0Aimport edu.rpi.cs.yacs.viewholders.CourseItemViewHolder;%0Aimport retrofit2.Call;%0Aimport retrofit2.Callback;%0Aimport retrofit2.Response;%0A%0A/**%0A * Created by mark on 11/20/16.%0A */%0A%0Apublic class CoursesAdapter extends RecyclerView.Adapter%3CCourseItemViewHolder%3E %7B%0A%0A    private List%3CCourse%3E courseList = null;%0A    private RecyclerViewFragment recyclerViewFragment = null;%0A    private String departmentCode = %22%22;%0A%0A    public CoursesAdapter(RecyclerViewFragment recyclerViewFragment, String departmentCode, List%3CCourse%3E courseList) %7B%0A        this.courseList = courseList;%0A        this.recyclerViewFragment = recyclerViewFragment;%0A        this.departmentCode = departmentCode;%0A    %7D%0A%0A    @Override%0A    public CourseItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) %7B%0A        LayoutInflater inflater = LayoutInflater.from(parent.getContext());%0A        View view = inflater.inflate(R.layout.course_view_item, parent, false);%0A%0A        return new CourseItemViewHolder(view);%0A    %7D%0A%0A    @Override%0A    public void onBindViewHolder(final CourseItemViewHolder holder, int position) %7B%0A        final Course course = courseList.get(position);%0A%0A        final String courseCode = departmentCode + %22 %22 + course.getNumber();%0A        final String credits = course.getMaxCredits() + %22 credits%22;%0A%0A        recyclerViewFragment.loadCourseSections(course.getId(), new Callback%3CSections%3E() %7B%0A            @Override%0A            public void onResponse(Call%3CSections%3E call, Response%3CSections%3E response) %7B%0A                Sections sections = response.body();%0A%0A                String description = course.getDescription();%0A%0A                if (description.isEmpty()) %7B%0A                    description = %22No description available%22;%0A                %7D%0A%0A                holder.render(course.getName(), courseCode, credits, description, sections.getSections());%0A            %7D%0A%0A            @Override%0A            public void onFailure(Call%3CSections%3E call, Throwable t) %7B%0A%0A            %7D%0A        %7D);%0A    %7D%0A%0A    @Override%0A    public int getItemCount() %7B%0A        return courseList.size();%0A    %7D%0A%7D

Create CoursesAdapter