Use custom event colors in the top bar
This commit is contained in:
parent
dc44935795
commit
75233a1bcd
|
@ -713,7 +713,11 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
private fun addAllDayEvent(event: Event) {
|
private fun addAllDayEvent(event: Event) {
|
||||||
(inflater.inflate(R.layout.week_all_day_event_marker, null, false) as ConstraintLayout).apply {
|
(inflater.inflate(R.layout.week_all_day_event_marker, null, false) as ConstraintLayout).apply {
|
||||||
var backgroundColor = eventTypeColors.get(event.eventType, primaryColor)
|
var backgroundColor = if (event.color == 0) {
|
||||||
|
eventTypeColors.get(event.eventType, primaryColor)
|
||||||
|
} else {
|
||||||
|
event.color
|
||||||
|
}
|
||||||
var textColor = backgroundColor.getContrastColor()
|
var textColor = backgroundColor.getContrastColor()
|
||||||
|
|
||||||
val adjustAlpha = if (event.isTask()) {
|
val adjustAlpha = if (event.isTask()) {
|
||||||
|
|
Loading…
Reference in New Issue