mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2024-12-25 07:50:56 +01:00
recheck week day letters in MonthView at updating items
This commit is contained in:
parent
503d941d65
commit
f59933564e
@ -41,14 +41,12 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
||||
}
|
||||
|
||||
weekDaysLetterHeight = 2 * normalTextSize.toInt()
|
||||
dayLetters = context.resources.getStringArray(R.array.week_day_letters).toList() as ArrayList<String>
|
||||
if (context.config.isSundayFirst) {
|
||||
dayLetters.moveLastItemToFront()
|
||||
}
|
||||
initWeekDayLetters()
|
||||
}
|
||||
|
||||
fun updateDays(newDays: ArrayList<DayMonthly>) {
|
||||
days = newDays
|
||||
initWeekDayLetters()
|
||||
invalidate()
|
||||
}
|
||||
|
||||
@ -112,4 +110,11 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
||||
curPaint.color = paintColor
|
||||
return curPaint
|
||||
}
|
||||
|
||||
private fun initWeekDayLetters() {
|
||||
dayLetters = context.resources.getStringArray(R.array.week_day_letters).toList() as ArrayList<String>
|
||||
if (context.config.isSundayFirst) {
|
||||
dayLetters.moveLastItemToFront()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user