diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/fragments/MonthFragment.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/fragments/MonthFragment.kt index 5a96de358..80140be03 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/fragments/MonthFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/fragments/MonthFragment.kt @@ -179,24 +179,24 @@ class MonthFragment : Fragment(), MonthlyCalendar { } } + val eventBackground = resources.getDrawable(R.drawable.circle_empty) + eventBackground.setColorFilter(mTextColor.adjustAlpha(LOW_ALPHA), PorterDuff.Mode.SRC_IN) + for (i in 0..len - 1) { val day = days[i] - var curTextColor = if (day.hasEvent) mWeakTextColorWithEvent else mWeakTextColor var curTextSize = mDayTextSize - if (day.isThisMonth) { - curTextColor = if (day.hasEvent) mTextColorWithEvent else mTextColor - } - if (day.isToday) { curTextSize = mTodayTextSize } (mHolder.findViewById(mRes.getIdentifier("day_$i", "id", mPackageName)) as TextView).apply { text = day.value.toString() - setTextColor(curTextColor) + setTextColor(mTextColor) textSize = curTextSize setOnClickListener { openDay(day.code) } + if (day.hasEvent) + background = eventBackground } } } diff --git a/app/src/main/res/drawable/circle_empty.xml b/app/src/main/res/drawable/circle_empty.xml new file mode 100644 index 000000000..518a1f22d --- /dev/null +++ b/app/src/main/res/drawable/circle_empty.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + +