fixing some offset glitches at the yearly view
This commit is contained in:
parent
fbad874f5d
commit
3f9bbb443f
|
@ -79,11 +79,11 @@ class SmallMonthView(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
|
|||
for (y in 1..6) {
|
||||
for (x in 1..7) {
|
||||
if (curId in 1..days) {
|
||||
canvas.drawText(curId.toString(), x * dayWidth, y * dayWidth, getPaint(curId))
|
||||
canvas.drawText(curId.toString(), x * dayWidth - (dayWidth / 4), y * dayWidth, getPaint(curId))
|
||||
|
||||
if (curId == todaysId) {
|
||||
val dividerConstant = if (isLandscape) 6 else 4
|
||||
canvas.drawCircle(x * dayWidth - dayWidth / dividerConstant, y * dayWidth - dayWidth / dividerConstant, dayWidth * 0.41f, todayCirclePaint)
|
||||
canvas.drawCircle(x * dayWidth - dayWidth / 2, y * dayWidth - dayWidth / dividerConstant, dayWidth * 0.41f, todayCirclePaint)
|
||||
}
|
||||
}
|
||||
curId++
|
||||
|
|
Loading…
Reference in New Issue