make sure to add weekly events on the ui thread

This commit is contained in:
tibbi 2017-01-17 19:07:46 +01:00
parent a3b614862d
commit 78b8ece86f
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,9 @@ class WeekFragment : Fragment(), WeeklyCalendar {
val layout = mView.findViewById(res.getIdentifier("week_column_$dayOfWeek", "id", context.packageName)) as LinearLayout
LayoutInflater.from(context).inflate(R.layout.week_event_marker, null, false).apply {
background = ColorDrawable(eventColor)
layout.addView(this)
activity.runOnUiThread {
layout.addView(this)
}
}
}
}