properly display week number at the monthly widget
This commit is contained in:
parent
668a298321
commit
885b2c8654
|
@ -149,7 +149,7 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
|
|||
|
||||
for (i in 0..5) {
|
||||
(findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply {
|
||||
text = "${mDays!![i * 7].weekOfYear}:"
|
||||
text = "${mDays!![i * 7 + 3].weekOfYear}:"
|
||||
setTextColor(mWeakTextColor)
|
||||
visibility = View.VISIBLE
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar {
|
|||
for (i in 0..5) {
|
||||
val id = mRes.getIdentifier("week_num_$i", "id", packageName)
|
||||
mRemoteViews.apply {
|
||||
setTextViewText(id, days[i * 7].weekOfYear.toString() + ":")
|
||||
setTextViewText(id, days[i * 7 + 3].weekOfYear.toString() + ":")
|
||||
setInt(id, "setTextColor", mWeakTextColor)
|
||||
setViewVisibility(id, if (displayWeekNumbers) View.VISIBLE else View.GONE)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue