1 package de.dhbwloe.campusapp.fragments;
3 import android.content.Context;
4 import android.view.LayoutInflater;
5 import android.view.View;
6 import android.widget.TextView;
8 import java.text.SimpleDateFormat;
11 import de.dhbwloe.campusapp.CampusAppContext;
12 import de.dhbwloe.campusapp.R;
13 import de.dhbwloe.campusapp.vorlesungen.CourseEvent;
16 * Created by pk910 on 20.02.2016.
18 public class VorlesungsplanUpcomingCourseListItem {
19 private CourseEvent event;
21 public VorlesungsplanUpcomingCourseListItem(CourseEvent event) {
25 public void updateContainerView(View view) {
27 SimpleDateFormat dateFormat = new SimpleDateFormat(CampusAppContext.getInstance().getResString(R.string.timeformat_vorlesungsplan_time));
28 TextView timeFrom = (TextView) view.findViewById(R.id.timeFrom);
29 TextView timeTo = (TextView) view.findViewById(R.id.timeTo);
30 TextView location = (TextView) view.findViewById(R.id.location);
31 TextView courseTitle = (TextView) view.findViewById(R.id.courseTitle);
33 Date dateFrom = (new Date(event.getEventFrom() * 1000));
34 timeFrom.setText(dateFormat.format(dateFrom));
36 Date dateTo = (new Date(event.getEventTo() * 1000));
37 timeTo.setText(dateFormat.format(dateTo));
39 location.setText(event.getEventLocation());
40 courseTitle.setText(event.getEventTitle());