@@ -0,0 +1,1940 @@
+/*%0A * Copyright 2015 Quality and Usability Lab, Telekom Innvation Laboratories, TU Berlin..%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage de.tel.moccha.activities.fragments.adapters.course;%0A%0Aimport android.content.Context;%0Aimport android.view.View;%0Aimport android.widget.TextView;%0Aimport de.tel.moccha.activities.R;%0Aimport de.tel.moccha.entities.course.CourseCategory;%0Aimport de.tel.moccha.util.CourseCategoryComparator;%0Aimport de.zell.android.util.EntityComparator;%0Aimport de.zell.android.util.adapters.EntityListAdapter;%0Aimport de.zell.android.util.db.Entity;%0A%0A/**%0A * The entity list adapter to show the course category list.%0A * %0A * @author Christopher Zell %3Czelldon91@googlemail.com%3E%0A */%0Apublic class CourseCategoryListAdapter extends EntityListAdapter %7B%0A%0A  public CourseCategoryListAdapter(Context c) %7B%0A    super(c);%0A  %7D%0A%0A  @Override%0A  protected EntityComparator getComparator() %7B%0A    return new CourseCategoryComparator();%0A  %7D%0A%0A  @Override%0A  protected void setEntityView(View row, int pos) %7B%0A    CourseCategory category = (CourseCategory) entities.get(pos);%0A    if (category != null) %7B%0A      TextView title = (TextView) row.findViewById(de.zell.android.util.R.id.entity_title);%0A      title.setText(category.getName());%0A      title.setVisibility(View.VISIBLE);%0A    %7D%0A  %7D%0A%0A  @Override%0A  protected String getSection(Entity e) %7B%0A    return context.getString(R.string.course_category_list_section_header);%0A  %7D%0A  %0A%7D%0A

create course category list adapter for the course category list