use of com.jakdor.labday.view.adapter.TimetableAdapter in project LabDayApp by jakdor.
the class TimetableFragment method loadRecyclerView.
/**
* Load RecyclerView, and path info to bar
* @param appData from repository
* @param activePathId id of active Path
*/
private void loadRecyclerView(AppData appData, int activePathId) {
for (Path path : appData.getPaths()) {
if (path.getId() == activePathId) {
binding.setTitle(path.getInfo());
break;
}
}
RecyclerView recyclerView = binding.timetableRecyclerView;
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
recyclerView.setLayoutManager(linearLayoutManager);
TimetableAdapter timetableAdapter = new TimetableAdapter(this, appData, activePathId, GlideApp.with(this), getHeight());
recyclerView.setAdapter(timetableAdapter);
recyclerView.invalidate();
}
Aggregations