|
|
|
|
32
|
viewModel.day = arguments?.getString("day") ?: ""
|
32
|
viewModel.day = arguments?.getString("day") ?: ""
|
33
|
|
33
|
|
34
|
val root = inflater.inflate(R.layout.fragment_programme_day, container, false)
|
34
|
val root = inflater.inflate(R.layout.fragment_programme_day, container, false)
|
|
|
35
|
+
|
35
|
Planning.instance.programmes.forEach {
|
36
|
Planning.instance.programmes.forEach {
|
36
|
if (it.isThisDay(day = weekdays.indexOf(viewModel.day)))
|
37
|
if (it.isThisDay(day = weekdays.indexOf(viewModel.day)))
|
37
|
programmeOfTheDay.add(it)
|
38
|
programmeOfTheDay.add(it)
|
38
|
}
|
39
|
}
|
39
|
viewManager = LinearLayoutManager(context)
|
40
|
viewManager = LinearLayoutManager(context)
|
40
|
- viewAdapter =
|
|
|
41
|
- ProgrammeAdapter(programmeOfTheDay, viewModel.day)
|
|
|
|
|
41
|
+ viewAdapter = ProgrammeAdapter(programmeOfTheDay, viewModel.day)
|
42
|
recyclerView = root.findViewById<RecyclerView>(R.id.programme_recycler).apply {
|
42
|
recyclerView = root.findViewById<RecyclerView>(R.id.programme_recycler).apply {
|
43
|
// use this setting to improve performance if you know that changes
|
43
|
// use this setting to improve performance if you know that changes
|
44
|
// in content do not change the layout size of the RecyclerView
|
44
|
// in content do not change the layout size of the RecyclerView
|