@@ -13,10 +13,10 @@ import de.tobiasschuerg.weekview.util.dipToPixelI
13
13
import de.tobiasschuerg.weekview.util.toLocalString
14
14
import org.threeten.bp.DayOfWeek
15
15
import org.threeten.bp.Duration
16
+ import org.threeten.bp.LocalDate
16
17
import org.threeten.bp.LocalTime
17
18
import org.threeten.bp.format.TextStyle
18
19
import org.threeten.bp.temporal.ChronoUnit
19
- import org.threeten.bp.temporal.WeekFields
20
20
import java.util.Locale
21
21
import kotlin.math.roundToInt
22
22
@@ -125,7 +125,7 @@ internal class WeekBackgroundView constructor(context: Context) : View(context)
125
125
126
126
private fun Canvas.drawColumnsWithHeaders () {
127
127
Log .v(TAG , " Drawing vertical dividers on canvas" )
128
- val todayDay: DayOfWeek = WeekFields .of( Locale .getDefault()).firstDayOfWeek
128
+ val todayDay: DayOfWeek = LocalDate .now().dayOfWeek
129
129
for ((column, dayId) in days.withIndex()) {
130
130
drawLeftColumnDivider(column)
131
131
drawWeekDayName(dayId, column)
@@ -191,7 +191,7 @@ internal class WeekBackgroundView constructor(context: Context) : View(context)
191
191
192
192
override fun onMeasure (widthMeasureSpec : Int , hms : Int ) {
193
193
val height = topOffsetPx + context.dipToPixelF(getDurationMinutes() * scalingFactor) + paddingBottom
194
- val heightMeasureSpec2 = View . MeasureSpec .makeMeasureSpec(height.roundToInt(), View . MeasureSpec .EXACTLY )
194
+ val heightMeasureSpec2 = MeasureSpec .makeMeasureSpec(height.roundToInt(), MeasureSpec .EXACTLY )
195
195
super .onMeasure(widthMeasureSpec, heightMeasureSpec2)
196
196
}
197
197
0 commit comments