version 0.1.2
* fixed a crash that occurred if there was no meal for the current day * added a card if there's no more meals this week * added a card if there's no lesson at the current day
This commit is contained in:
@ -99,6 +99,13 @@ class MensaFragment : Fragment() {
|
||||
if(add)
|
||||
linLayoutMensaFragment.addView(cardViewMensaDay)
|
||||
}
|
||||
|
||||
// add a card if there are no more meals in this week
|
||||
if(linLayoutMensaFragment.childCount == 0) {
|
||||
val cardViewNoMoreFood = MensaDayCardView(context!!, null)
|
||||
cardViewNoMoreFood.setDayHeading(resources.getString(R.string.no_more_food))
|
||||
linLayoutMensaFragment.addView(cardViewNoMoreFood)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user