mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-13 10:20:49 +01:00
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) {
|
for (i in 0..5) {
|
||||||
(findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply {
|
(findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply {
|
||||||
text = "${mDays!![i * 7].weekOfYear}:"
|
text = "${mDays!![i * 7 + 3].weekOfYear}:"
|
||||||
setTextColor(mWeakTextColor)
|
setTextColor(mWeakTextColor)
|
||||||
visibility = View.VISIBLE
|
visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar {
|
|||||||
for (i in 0..5) {
|
for (i in 0..5) {
|
||||||
val id = mRes.getIdentifier("week_num_$i", "id", packageName)
|
val id = mRes.getIdentifier("week_num_$i", "id", packageName)
|
||||||
mRemoteViews.apply {
|
mRemoteViews.apply {
|
||||||
setTextViewText(id, days[i * 7].weekOfYear.toString() + ":")
|
setTextViewText(id, days[i * 7 + 3].weekOfYear.toString() + ":")
|
||||||
setInt(id, "setTextColor", mWeakTextColor)
|
setInt(id, "setTextColor", mWeakTextColor)
|
||||||
setViewVisibility(id, if (displayWeekNumbers) View.VISIBLE else View.GONE)
|
setViewVisibility(id, if (displayWeekNumbers) View.VISIBLE else View.GONE)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user