initialize the mCalendar sooner
This commit is contained in:
parent
cf9ce74f63
commit
e4b1d63ce7
1 changed files with 1 additions and 1 deletions
|
@ -48,6 +48,7 @@ class MyWidgetProvider : AppWidgetProvider(), MonthlyCalendar {
|
|||
private fun initVariables(context: Context) {
|
||||
mContext = context
|
||||
mRes = mContext.resources
|
||||
mCalendar = MonthlyCalendarImpl(this, mContext)
|
||||
|
||||
val prefs = initPrefs(context)
|
||||
val storedTextColor = prefs.getInt(WIDGET_TEXT_COLOR, Color.WHITE)
|
||||
|
@ -67,7 +68,6 @@ class MyWidgetProvider : AppWidgetProvider(), MonthlyCalendar {
|
|||
val bgColor = prefs.getInt(WIDGET_BG_COLOR, Color.BLACK)
|
||||
mRemoteViews.setInt(R.id.calendar_holder, "setBackgroundColor", bgColor)
|
||||
|
||||
mCalendar = MonthlyCalendarImpl(this, mContext)
|
||||
mCalendar.updateMonthlyCalendar(DateTime())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue