mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
Use custom event colors in the top bar
This commit is contained in:
@ -713,7 +713,11 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
||||
@SuppressLint("NewApi")
|
||||
private fun addAllDayEvent(event: Event) {
|
||||
(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()
|
||||
|
||||
val adjustAlpha = if (event.isTask()) {
|
||||
|
Reference in New Issue
Block a user