use of de.tum.in.tumcampusapp.component.tumui.calendar.model.CalendarItem in project TumCampusApp by TCA-Team.
the class TimetableWidgetConfigureActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_timetable_widget_configure);
// Setup toolbar and save button
setSupportActionBar(findViewById(R.id.main_toolbar));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_check);
// Get appWidgetId from intent
Intent intent = getIntent();
Bundle extras = intent.getExtras();
if (extras != null) {
appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
}
ListView listViewLectures = findViewById(R.id.activity_timetable_lectures);
// Initialize stations adapter
CalendarController calendarController = new CalendarController(this);
List<CalendarItem> lectures = calendarController.getLecturesForWidget(this.appWidgetId);
listViewLectures.setAdapter(new LectureListSelectionAdapter(this, lectures, this.appWidgetId));
listViewLectures.requestFocus();
}
Aggregations