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:
2018-11-01 01:06:53 +01:00
parent 9f09fdcff2
commit b915f574fe
8 changed files with 43 additions and 18 deletions

View File

@ -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)
}
}
}