mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 04:10:45 +01:00
initialize the mCalendar sooner
This commit is contained in:
parent
cf9ce74f63
commit
e4b1d63ce7
@ -48,6 +48,7 @@ class MyWidgetProvider : AppWidgetProvider(), MonthlyCalendar {
|
|||||||
private fun initVariables(context: Context) {
|
private fun initVariables(context: Context) {
|
||||||
mContext = context
|
mContext = context
|
||||||
mRes = mContext.resources
|
mRes = mContext.resources
|
||||||
|
mCalendar = MonthlyCalendarImpl(this, mContext)
|
||||||
|
|
||||||
val prefs = initPrefs(context)
|
val prefs = initPrefs(context)
|
||||||
val storedTextColor = prefs.getInt(WIDGET_TEXT_COLOR, Color.WHITE)
|
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)
|
val bgColor = prefs.getInt(WIDGET_BG_COLOR, Color.BLACK)
|
||||||
mRemoteViews.setInt(R.id.calendar_holder, "setBackgroundColor", bgColor)
|
mRemoteViews.setInt(R.id.calendar_holder, "setBackgroundColor", bgColor)
|
||||||
|
|
||||||
mCalendar = MonthlyCalendarImpl(this, mContext)
|
|
||||||
mCalendar.updateMonthlyCalendar(DateTime())
|
mCalendar.updateMonthlyCalendar(DateTime())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user