Merge pull request #36 from SimpleMobileTools/master

upd
This commit is contained in:
solokot
2021-03-10 22:04:32 +03:00
committed by GitHub
77 changed files with 690 additions and 260 deletions

View File

@@ -1,6 +1,23 @@
Changelog Changelog
========== ==========
Version 6.13.1 *(2021-03-10)*
----------------------------
* Allow repeating events every fifth weekday
* Properly highlight weekends on widgets, if selected so
* Fixed some CalDAV syncing and .ics file importing issues
Version 6.13.0 *(2021-02-23)*
----------------------------
* Added a new combination of monthly + daily view
* Fixed too big background activity with CalDAV sync enabled
* Fixed some glitches at importing .ics files
* Fixed a glitch at new events having wrong date set by default in some cases
* Added a setting item for quick notification customizing on Android 8+
* Added some translation and stability improvements
Version 6.12.0 *(2021-02-13)* Version 6.12.0 *(2021-02-13)*
---------------------------- ----------------------------

View File

@@ -11,15 +11,14 @@ if (keystorePropertiesFile.exists()) {
} }
android { android {
compileSdkVersion 29 compileSdkVersion 30
buildToolsVersion "29.0.3"
defaultConfig { defaultConfig {
applicationId "com.simplemobiletools.calendar.pro" applicationId "com.simplemobiletools.calendar.pro"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 30
versionCode 191 versionCode 193
versionName "6.12.0" versionName "6.13.1"
multiDexEnabled true multiDexEnabled true
setProperty("archivesBaseName", "calendar") setProperty("archivesBaseName", "calendar")
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
@@ -64,8 +63,8 @@ android {
} }
dependencies { dependencies {
implementation 'com.simplemobiletools:commons:5.33.35' implementation 'com.simplemobiletools:commons:5.34.21'
implementation 'joda-time:joda-time:2.10.1' implementation 'joda-time:joda-time:2.10.3'
implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

View File

@@ -67,8 +67,8 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Bhogi SUMMARY:Bhogi
UID:ind_9 UID:ind_9
DTSTART;VALUE=DATE:20160114 DTSTART;VALUE=DATE:20220113
DTEND;VALUE=DATE:20160115 DTEND;VALUE=DATE:20220114
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
EXDATE:20180113} EXDATE:20180113}
@@ -92,8 +92,8 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Maha Shivaratri SUMMARY:Maha Shivaratri
UID:ind_12 UID:ind_12
DTSTART;VALUE=DATE:20160226 DTSTART;VALUE=DATE:20220301
DTEND;VALUE=DATE:20160227 DTEND;VALUE=DATE:20220302
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
EXDATE:20170225} EXDATE:20170225}
@@ -101,16 +101,16 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Solar Eclipse [Total] SUMMARY:Solar Eclipse [Total]
UID:ind_13 UID:ind_13
DTSTART:20160309T005800Z DTSTART;VALUE=DATE:20211204
DTEND:20160309T010200Z DTEND;VALUE=DATE:20211205
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Holi SUMMARY:Holi
UID:ind_14 UID:ind_14
DTSTART;VALUE=DATE:20160323 DTSTART;VALUE=DATE:20210328
DTEND;VALUE=DATE:20160324 DTEND;VALUE=DATE:20210329
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
END:VEVENT END:VEVENT
@@ -182,16 +182,16 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Sri Ram navami SUMMARY:Sri Ram navami
UID:ind_23 UID:ind_23
DTSTART;VALUE=DATE:20160415 DTSTART;VALUE=DATE:20160421
DTEND;VALUE=DATE:20160416 DTEND;VALUE=DATE:20160422
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Mahavir Jayanti SUMMARY:Mahavir Jayanti
UID:ind_24 UID:ind_24
DTSTART;VALUE=DATE:20160419 DTSTART;VALUE=DATE:20210425
DTEND;VALUE=DATE:20160420 DTEND;VALUE=DATE:20210426
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
EXDATE:20180420} EXDATE:20180420}
@@ -215,8 +215,8 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Buddha Purnima SUMMARY:Buddha Purnima
UID:ind_27 UID:ind_27
DTSTART;VALUE=DATE:20160521 DTSTART;VALUE=DATE:20210526
DTEND;VALUE=DATE:20160522 DTEND;VALUE=DATE:20210527
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
EXDATE:20170522} EXDATE:20170522}
@@ -224,8 +224,8 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Raksha Bandhan SUMMARY:Raksha Bandhan
UID:ind_28 UID:ind_28
DTSTART;VALUE=DATE:20160705 DTSTART;VALUE=DATE:20210822
DTEND;VALUE=DATE:20160706 DTEND;VALUE=DATE:20210823
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
EXDATE:20170706} EXDATE:20170706}
@@ -233,8 +233,8 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Parsi New Year SUMMARY:Parsi New Year
UID:ind_29 UID:ind_29
DTSTART;VALUE=DATE:20160817 DTSTART;VALUE=DATE:20220819
DTEND;VALUE=DATE:20160818 DTEND;VALUE=DATE:20220820
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
EXDATE:20180818} EXDATE:20180818}
@@ -242,8 +242,8 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Janmashtami SUMMARY:Janmashtami
UID:ind_30 UID:ind_30
DTSTART;VALUE=DATE:20160825 DTSTART;VALUE=DATE:20210831
DTEND;VALUE=DATE:20160826 DTEND;VALUE=DATE:20210901
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
EXDATE:20170826} EXDATE:20170826}
@@ -251,24 +251,24 @@ END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Solar Eclipse [Annular] SUMMARY:Solar Eclipse [Annular]
UID:ind_31 UID:ind_31
DTSTART:20160901T070800Z DTSTART;VALUE=DATE:20210610
DTEND:20160901T071200Z DTEND;VALUE=DATE:20210611
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Ganesh Chaturthi SUMMARY:Ganesh Chaturthi
UID:ind_32 UID:ind_32
DTSTART;VALUE=DATE:20160905 DTSTART;VALUE=DATE:20210910
DTEND;VALUE=DATE:20160906 DTEND;VALUE=DATE:20210911
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
SUMMARY:Onam SUMMARY:Onam
UID:ind_33 UID:ind_33
DTSTART;VALUE=DATE:20160913 DTSTART;VALUE=DATE:20220907
DTEND;VALUE=DATE:20160914 DTEND;VALUE=DATE:20220908
STATUS:CONFIRMED STATUS:CONFIRMED
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
END:VEVENT END:VEVENT

View File

@@ -70,12 +70,13 @@ SUMMARY:海の日 / Umi no hi / Marine Day
RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=3MO RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=3MO
DTSTART;VALUE=DATE:20070716 DTSTART;VALUE=DATE:20070716
DTEND;VALUE=DATE:20070717 DTEND;VALUE=DATE:20070717
EXDATE:20200720,20210719
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
STATUS:CONFIRMED STATUS:CONFIRMED
UID:jap_10 UID:jap_10
SUMMARY:体育の日 / Taiiku no hi / Health-Sports Day SUMMARY:体育の日 / Taiiku no hi / Health-Sports Day
RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=2MO RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=2MO;UNTIL=20191231
DTSTART;VALUE=DATE:20071008 DTSTART;VALUE=DATE:20071008
DTEND;VALUE=DATE:20071009 DTEND;VALUE=DATE:20071009
END:VEVENT END:VEVENT
@@ -99,7 +100,7 @@ BEGIN:VEVENT
STATUS:CONFIRMED STATUS:CONFIRMED
UID:jap_13 UID:jap_13
SUMMARY:天皇誕生日 / Tennō tanjōbi / Emperor Akihito's Birthday SUMMARY:天皇誕生日 / Tennō tanjōbi / Emperor Akihito's Birthday
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20190430
DTSTART;VALUE=DATE:20071223 DTSTART;VALUE=DATE:20071223
DTEND;VALUE=DATE:20071224 DTEND;VALUE=DATE:20071224
END:VEVENT END:VEVENT
@@ -370,6 +371,7 @@ SUMMARY:山の日 / Yama no hi / Mountain Day
RRULE:FREQ=YEARLY;INTERVAL=1 RRULE:FREQ=YEARLY;INTERVAL=1
DTSTART;VALUE=DATE:20160811 DTSTART;VALUE=DATE:20160811
DTEND;VALUE=DATE:20160812 DTEND;VALUE=DATE:20160812
EXDATE:20200811,20210811
END:VEVENT END:VEVENT
BEGIN:VEVENT BEGIN:VEVENT
STATUS:CONFIRMED STATUS:CONFIRMED
@@ -378,4 +380,105 @@ SUMMARY:振替休日 / Furikae kyūjitsu / Substitute Holiday
DTSTART;VALUE=DATE:20190812 DTSTART;VALUE=DATE:20190812
DTEND;VALUE=DATE:20190813 DTEND;VALUE=DATE:20190813
END:VEVENT END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_52
SUMMARY:振替休日 / Furikae kyūjitsu / Substitute Holiday
DTSTART;VALUE=DATE:20200224
DTEND;VALUE=DATE:20200225
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_53
SUMMARY:振替休日 / Furikae kyūjitsu / Substitute Holiday
DTSTART;VALUE=DATE:20210809
DTEND;VALUE=DATE:20210810
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_54
SUMMARY:国民の休日 / Kokumin no kyūjitsu / National Holiday
DTSTART;VALUE=DATE:20190430
DTEND;VALUE=DATE:20190501
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_55
SUMMARY:国民の休日 / Kokumin no kyūjitsu / National Holiday
DTSTART;VALUE=DATE:20190502
DTEND;VALUE=DATE:20190503
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_56
SUMMARY:即位礼正殿の儀 / Sokuireiseiden no gi
DTSTART;VALUE=DATE:20191022
DTEND;VALUE=DATE:20191023
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_57
SUMMARY:即位の日 / Sokui no hi / Emperor Naruhito's Enthronement Day
DTSTART;VALUE=DATE:20190501
DTEND;VALUE=DATE:20190502
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_58
SUMMARY:天皇誕生日 / Tennō tanjōbi / Emperor Naruhito's Birthday
RRULE:FREQ=YEARLY;INTERVAL=1
DTSTART;VALUE=DATE:20200223
DTEND;VALUE=DATE:20200224
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_59
SUMMARY:海の日 / Umi no hi / Marine Day
DTSTART;VALUE=DATE:20200723
DTEND;VALUE=DATE:20200724
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_60
SUMMARY:海の日 / Umi no hi / Marine Day
DTSTART;VALUE=DATE:20210722
DTEND;VALUE=DATE:20210723
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_61
SUMMARY:山の日 / Yama no hi / Mountain Day
DTSTART;VALUE=DATE:20200810
DTEND;VALUE=DATE:20200811
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_62
SUMMARY:山の日 / Yama no hi / Mountain Day
DTSTART;VALUE=DATE:20210808
DTEND;VALUE=DATE:20210809
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_63
SUMMARY:スポーツの日 / Supōtu o hi / Sports Day
RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=2MO
DTSTART;VALUE=DATE:20201012
DTEND;VALUE=DATE:20201013
EXDATE:20201012,20211011
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_64
SUMMARY:スポーツの日 / Supōtu o hi / Sports Day
DTSTART;VALUE=DATE:20200724
DTEND;VALUE=DATE:20200725
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
UID:jap_65
SUMMARY:スポーツの日 / Supōtu o hi / Sports Day
DTSTART;VALUE=DATE:20210723
DTEND;VALUE=DATE:20210724
END:VEVENT
END:VCALENDAR END:VCALENDAR

View File

@@ -256,7 +256,8 @@ class EventActivity : SimpleActivity() {
0 0
} else { } else {
val original = if (mOriginalTimeZone.isEmpty()) DateTimeZone.getDefault().id else mOriginalTimeZone val original = if (mOriginalTimeZone.isEmpty()) DateTimeZone.getDefault().id else mOriginalTimeZone
(DateTimeZone.forID(mEvent.getTimeZoneString()).getOffset(System.currentTimeMillis()) - DateTimeZone.forID(original).getOffset(System.currentTimeMillis())) / 1000L val millis = System.currentTimeMillis()
(DateTimeZone.forID(mEvent.getTimeZoneString()).getOffset(millis) - DateTimeZone.forID(original).getOffset(millis)) / 1000L
} }
val newStartTS = mEventStartDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() - offset val newStartTS = mEventStartDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds() - offset
@@ -289,9 +290,9 @@ class EventActivity : SimpleActivity() {
} }
val reminders = getReminders() val reminders = getReminders()
if (event_title.value != mEvent.title || if (event_title.text.toString() != mEvent.title ||
event_location.value != mEvent.location || event_location.text.toString() != mEvent.location ||
event_description.value != mEvent.description || event_description.text.toString() != mEvent.description ||
event_time_zone.text != mEvent.getTimeZoneString() || event_time_zone.text != mEvent.getTimeZoneString() ||
reminders != mEvent.getReminders() || reminders != mEvent.getReminders() ||
mRepeatInterval != mEvent.repeatInterval || mRepeatInterval != mEvent.repeatInterval ||
@@ -644,17 +645,9 @@ class EventActivity : SimpleActivity() {
private fun getAvailableMonthlyRepetitionRules(): ArrayList<RadioItem> { private fun getAvailableMonthlyRepetitionRules(): ArrayList<RadioItem> {
val items = arrayListOf(RadioItem(REPEAT_SAME_DAY, getString(R.string.repeat_on_the_same_day_monthly))) val items = arrayListOf(RadioItem(REPEAT_SAME_DAY, getString(R.string.repeat_on_the_same_day_monthly)))
// split Every Last Sunday and Every Fourth Sunday of the month, if the month has 4 sundays items.add(RadioItem(REPEAT_ORDER_WEEKDAY, getRepeatXthDayString(true, REPEAT_ORDER_WEEKDAY)))
if (isLastWeekDayOfMonth()) { if (isLastWeekDayOfMonth()) {
val order = (mEventStartDateTime.dayOfMonth - 1) / 7 + 1 items.add(RadioItem(REPEAT_ORDER_WEEKDAY_USE_LAST, getRepeatXthDayString(true, REPEAT_ORDER_WEEKDAY_USE_LAST)))
if (order == 4) {
items.add(RadioItem(REPEAT_ORDER_WEEKDAY, getRepeatXthDayString(true, REPEAT_ORDER_WEEKDAY)))
items.add(RadioItem(REPEAT_ORDER_WEEKDAY_USE_LAST, getRepeatXthDayString(true, REPEAT_ORDER_WEEKDAY_USE_LAST)))
} else if (order == 5) {
items.add(RadioItem(REPEAT_ORDER_WEEKDAY_USE_LAST, getRepeatXthDayString(true, REPEAT_ORDER_WEEKDAY_USE_LAST)))
}
} else {
items.add(RadioItem(REPEAT_ORDER_WEEKDAY, getRepeatXthDayString(true, REPEAT_ORDER_WEEKDAY)))
} }
if (isLastDayOfTheMonth()) { if (isLastDayOfTheMonth()) {
@@ -666,16 +659,9 @@ class EventActivity : SimpleActivity() {
private fun getAvailableYearlyRepetitionRules(): ArrayList<RadioItem> { private fun getAvailableYearlyRepetitionRules(): ArrayList<RadioItem> {
val items = arrayListOf(RadioItem(REPEAT_SAME_DAY, getString(R.string.repeat_on_the_same_day_yearly))) val items = arrayListOf(RadioItem(REPEAT_SAME_DAY, getString(R.string.repeat_on_the_same_day_yearly)))
items.add(RadioItem(REPEAT_ORDER_WEEKDAY, getRepeatXthDayInMonthString(true, REPEAT_ORDER_WEEKDAY)))
if (isLastWeekDayOfMonth()) { if (isLastWeekDayOfMonth()) {
val order = (mEventStartDateTime.dayOfMonth - 1) / 7 + 1 items.add(RadioItem(REPEAT_ORDER_WEEKDAY_USE_LAST, getRepeatXthDayInMonthString(true, REPEAT_ORDER_WEEKDAY_USE_LAST)))
if (order == 4) {
items.add(RadioItem(REPEAT_ORDER_WEEKDAY, getRepeatXthDayInMonthString(true, REPEAT_ORDER_WEEKDAY)))
items.add(RadioItem(REPEAT_ORDER_WEEKDAY_USE_LAST, getRepeatXthDayInMonthString(true, REPEAT_ORDER_WEEKDAY_USE_LAST)))
} else if (order == 5) {
items.add(RadioItem(REPEAT_ORDER_WEEKDAY_USE_LAST, getRepeatXthDayInMonthString(true, REPEAT_ORDER_WEEKDAY_USE_LAST)))
}
} else {
items.add(RadioItem(REPEAT_ORDER_WEEKDAY, getRepeatXthDayInMonthString(true, REPEAT_ORDER_WEEKDAY)))
} }
return items return items
@@ -711,7 +697,7 @@ class EventActivity : SimpleActivity() {
private fun getOrderString(repeatRule: Int): String { private fun getOrderString(repeatRule: Int): String {
val dayOfMonth = mEventStartDateTime.dayOfMonth val dayOfMonth = mEventStartDateTime.dayOfMonth
var order = (dayOfMonth - 1) / 7 + 1 var order = (dayOfMonth - 1) / 7 + 1
if (order == 4 && isLastWeekDayOfMonth() && repeatRule == REPEAT_ORDER_WEEKDAY_USE_LAST) { if (isLastWeekDayOfMonth() && repeatRule == REPEAT_ORDER_WEEKDAY_USE_LAST) {
order = -1 order = -1
} }
@@ -721,6 +707,7 @@ class EventActivity : SimpleActivity() {
2 -> if (isMale) R.string.second_m else R.string.second_f 2 -> if (isMale) R.string.second_m else R.string.second_f
3 -> if (isMale) R.string.third_m else R.string.third_f 3 -> if (isMale) R.string.third_m else R.string.third_f
4 -> if (isMale) R.string.fourth_m else R.string.fourth_f 4 -> if (isMale) R.string.fourth_m else R.string.fourth_f
5 -> if (isMale) R.string.fifth_m else R.string.fifth_f
else -> if (isMale) R.string.last_m else R.string.last_f else -> if (isMale) R.string.last_m else R.string.last_f
}) })
} }

View File

@@ -172,6 +172,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
shouldGoToTodayBeVisible = currentFragments.last().shouldGoToTodayBeVisible() shouldGoToTodayBeVisible = currentFragments.last().shouldGoToTodayBeVisible()
menu.apply { menu.apply {
goToTodayButton = findItem(R.id.go_to_today) goToTodayButton = findItem(R.id.go_to_today)
findItem(R.id.print).isVisible = config.storedView != MONTHLY_DAILY_VIEW
findItem(R.id.filter).isVisible = mShouldFilterBeVisible findItem(R.id.filter).isVisible = mShouldFilterBeVisible
findItem(R.id.go_to_today).isVisible = shouldGoToTodayBeVisible && !mIsSearchOpen findItem(R.id.go_to_today).isVisible = shouldGoToTodayBeVisible && !mIsSearchOpen
findItem(R.id.go_to_date).isVisible = config.storedView != EVENTS_LIST_VIEW findItem(R.id.go_to_date).isVisible = config.storedView != EVENTS_LIST_VIEW
@@ -933,11 +934,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
val licenses = LICENSE_JODA val licenses = LICENSE_JODA
val faqItems = arrayListOf( val faqItems = arrayListOf(
FAQItem(R.string.faq_1_title_commons, R.string.faq_1_text_commons),
FAQItem(R.string.faq_4_title_commons, R.string.faq_4_text_commons),
FAQItem(R.string.faq_1_title, R.string.faq_1_text),
FAQItem(R.string.faq_2_title, R.string.faq_2_text), FAQItem(R.string.faq_2_title, R.string.faq_2_text),
FAQItem(R.string.faq_3_title, R.string.faq_3_text), FAQItem(R.string.faq_3_title, R.string.faq_3_text),
FAQItem(R.string.faq_1_title, R.string.faq_1_text),
FAQItem(R.string.faq_1_title_commons, R.string.faq_1_text_commons),
FAQItem(R.string.faq_4_title_commons, R.string.faq_4_text_commons),
FAQItem(R.string.faq_4_title, R.string.faq_4_text), FAQItem(R.string.faq_4_title, R.string.faq_4_text),
FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons), FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons),
FAQItem(R.string.faq_6_title_commons, R.string.faq_6_text_commons), FAQItem(R.string.faq_6_title_commons, R.string.faq_6_text_commons),
@@ -955,7 +956,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
search_results_list.beVisibleIf(events.isNotEmpty()) search_results_list.beVisibleIf(events.isNotEmpty())
search_placeholder.beVisibleIf(events.isEmpty()) search_placeholder.beVisibleIf(events.isEmpty())
val listItems = getEventListItems(events) val listItems = getEventListItems(events)
val eventsAdapter = EventListAdapter(this, listItems, true, this, search_results_list) { val eventsAdapter = EventListAdapter(this, listItems, true, this, search_results_list, true) {
if (it is ListEvent) { if (it is ListEvent) {
Intent(applicationContext, EventActivity::class.java).apply { Intent(applicationContext, EventActivity::class.java).apply {
putExtra(EVENT_ID, it.id) putExtra(EVENT_ID, it.id)

View File

@@ -43,6 +43,7 @@ class SettingsActivity : SimpleActivity() {
private fun setupSettingItems() { private fun setupSettingItems() {
setupCustomizeColors() setupCustomizeColors()
setupCustomizeNotifications()
setupUseEnglish() setupUseEnglish()
setupManageEventTypes() setupManageEventTypes()
setupHourFormat() setupHourFormat()
@@ -139,6 +140,13 @@ class SettingsActivity : SimpleActivity() {
} }
} }
private fun setupCustomizeNotifications() {
settings_customize_notifications_holder.beVisibleIf(isOreoPlus())
settings_customize_notifications_holder.setOnClickListener {
launchCustomizeNotificationsIntent()
}
}
private fun setupUseEnglish() { private fun setupUseEnglish() {
settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en") settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en")
settings_use_english.isChecked = config.useEnglish settings_use_english.isChecked = config.useEnglish
@@ -340,11 +348,11 @@ class SettingsActivity : SimpleActivity() {
updateReminderSound(it) updateReminderSound(it)
} }
}, onAlarmSoundDeleted = { }, onAlarmSoundDeleted = {
if (it.uri == config.reminderSoundUri) { if (it.uri == config.reminderSoundUri) {
val defaultAlarm = getDefaultAlarmSound(RingtoneManager.TYPE_NOTIFICATION) val defaultAlarm = getDefaultAlarmSound(RingtoneManager.TYPE_NOTIFICATION)
updateReminderSound(defaultAlarm) updateReminderSound(defaultAlarm)
} }
}) })
} }
} }

View File

@@ -9,12 +9,12 @@ import android.widget.SeekBar
import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.config
import com.simplemobiletools.calendar.pro.helpers.Formatter import com.simplemobiletools.calendar.pro.helpers.Formatter
import com.simplemobiletools.calendar.pro.helpers.LOW_ALPHA
import com.simplemobiletools.calendar.pro.helpers.MyWidgetDateProvider import com.simplemobiletools.calendar.pro.helpers.MyWidgetDateProvider
import com.simplemobiletools.commons.dialogs.ColorPickerDialog import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.adjustAlpha import com.simplemobiletools.commons.extensions.adjustAlpha
import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.setFillWithStroke import com.simplemobiletools.commons.extensions.setFillWithStroke
import com.simplemobiletools.commons.helpers.LOWER_ALPHA
import kotlinx.android.synthetic.main.widget_config_date.* import kotlinx.android.synthetic.main.widget_config_date.*
class WidgetDateConfigureActivity : SimpleActivity() { class WidgetDateConfigureActivity : SimpleActivity() {
@@ -112,7 +112,7 @@ class WidgetDateConfigureActivity : SimpleActivity() {
private fun updateColors() { private fun updateColors() {
mTextColor = mTextColorWithoutTransparency mTextColor = mTextColorWithoutTransparency
mWeakTextColor = mTextColorWithoutTransparency.adjustAlpha(LOW_ALPHA) mWeakTextColor = mTextColorWithoutTransparency.adjustAlpha(LOWER_ALPHA)
mPrimaryColor = config.primaryColor mPrimaryColor = config.primaryColor
config_text_color.setFillWithStroke(mTextColor, Color.BLACK) config_text_color.setFillWithStroke(mTextColor, Color.BLACK)

View File

@@ -46,7 +46,7 @@ class WidgetListConfigureActivity : SimpleActivity() {
finish() finish()
} }
EventListAdapter(this, getListItems(), false, null, config_events_list) {}.apply { EventListAdapter(this, getListItems(), false, null, config_events_list, true) {}.apply {
updateTextColor(mTextColor) updateTextColor(mTextColor)
config_events_list.adapter = this config_events_list.adapter = this
} }

View File

@@ -13,7 +13,6 @@ import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.extensions.addDayEvents import com.simplemobiletools.calendar.pro.extensions.addDayEvents
import com.simplemobiletools.calendar.pro.extensions.addDayNumber import com.simplemobiletools.calendar.pro.extensions.addDayNumber
import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.config
import com.simplemobiletools.calendar.pro.helpers.LOW_ALPHA
import com.simplemobiletools.calendar.pro.helpers.MonthlyCalendarImpl import com.simplemobiletools.calendar.pro.helpers.MonthlyCalendarImpl
import com.simplemobiletools.calendar.pro.helpers.MyWidgetMonthlyProvider import com.simplemobiletools.calendar.pro.helpers.MyWidgetMonthlyProvider
import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar
@@ -23,6 +22,7 @@ import com.simplemobiletools.commons.extensions.adjustAlpha
import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.beVisible import com.simplemobiletools.commons.extensions.beVisible
import com.simplemobiletools.commons.extensions.setFillWithStroke import com.simplemobiletools.commons.extensions.setFillWithStroke
import com.simplemobiletools.commons.helpers.LOWER_ALPHA
import kotlinx.android.synthetic.main.first_row.* import kotlinx.android.synthetic.main.first_row.*
import kotlinx.android.synthetic.main.top_navigation.* import kotlinx.android.synthetic.main.top_navigation.*
import kotlinx.android.synthetic.main.widget_config_monthly.* import kotlinx.android.synthetic.main.widget_config_monthly.*
@@ -127,7 +127,7 @@ class WidgetMonthlyConfigureActivity : SimpleActivity(), MonthlyCalendar {
private fun updateColors() { private fun updateColors() {
mTextColor = mTextColorWithoutTransparency mTextColor = mTextColorWithoutTransparency
mWeakTextColor = mTextColorWithoutTransparency.adjustAlpha(LOW_ALPHA) mWeakTextColor = mTextColorWithoutTransparency.adjustAlpha(LOWER_ALPHA)
mPrimaryColor = config.primaryColor mPrimaryColor = config.primaryColor
top_left_arrow.applyColorFilter(mTextColor) top_left_arrow.applyColorFilter(mTextColor)

View File

@@ -13,13 +13,13 @@ import com.simplemobiletools.calendar.pro.extensions.shareEvents
import com.simplemobiletools.calendar.pro.helpers.Formatter import com.simplemobiletools.calendar.pro.helpers.Formatter
import com.simplemobiletools.calendar.pro.helpers.ITEM_EVENT import com.simplemobiletools.calendar.pro.helpers.ITEM_EVENT
import com.simplemobiletools.calendar.pro.helpers.ITEM_EVENT_SIMPLE import com.simplemobiletools.calendar.pro.helpers.ITEM_EVENT_SIMPLE
import com.simplemobiletools.calendar.pro.helpers.LOW_ALPHA
import com.simplemobiletools.calendar.pro.models.Event import com.simplemobiletools.calendar.pro.models.Event
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
import com.simplemobiletools.commons.extensions.adjustAlpha import com.simplemobiletools.commons.extensions.adjustAlpha
import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.beInvisible import com.simplemobiletools.commons.extensions.beInvisible
import com.simplemobiletools.commons.extensions.beInvisibleIf import com.simplemobiletools.commons.extensions.beInvisibleIf
import com.simplemobiletools.commons.helpers.LOWER_ALPHA
import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import kotlinx.android.synthetic.main.event_item_day_view.view.* import kotlinx.android.synthetic.main.event_item_day_view.view.*
@@ -136,7 +136,7 @@ class DayEventsAdapter(activity: SimpleActivity, val events: ArrayList<Event>, r
var newTextColor = textColor var newTextColor = textColor
if (dimPastEvents && event.isPastEvent && !isPrintVersion) { if (dimPastEvents && event.isPastEvent && !isPrintVersion) {
newTextColor = newTextColor.adjustAlpha(LOW_ALPHA) newTextColor = newTextColor.adjustAlpha(LOWER_ALPHA)
} }
event_item_start.setTextColor(newTextColor) event_item_start.setTextColor(newTextColor)

View File

@@ -20,6 +20,7 @@ import com.simplemobiletools.commons.extensions.adjustAlpha
import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.beInvisible import com.simplemobiletools.commons.extensions.beInvisible
import com.simplemobiletools.commons.extensions.beInvisibleIf import com.simplemobiletools.commons.extensions.beInvisibleIf
import com.simplemobiletools.commons.helpers.LOWER_ALPHA
import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
@@ -28,7 +29,7 @@ import kotlinx.android.synthetic.main.event_list_section.view.*
import java.util.* import java.util.*
class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListItem>, val allowLongClick: Boolean, val listener: RefreshRecyclerViewListener?, class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListItem>, val allowLongClick: Boolean, val listener: RefreshRecyclerViewListener?,
recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) { recyclerView: MyRecyclerView, val tryDimPastEvents: Boolean, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) {
private val topDivider = resources.getDrawable(R.drawable.divider_width) private val topDivider = resources.getDrawable(R.drawable.divider_width)
private val allDayString = resources.getString(R.string.all_day) private val allDayString = resources.getString(R.string.all_day)
@@ -176,9 +177,9 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
startTextColor = adjustedPrimaryColor startTextColor = adjustedPrimaryColor
} }
if (dimPastEvents && listEvent.isPastEvent && !isPrintVersion) { if (tryDimPastEvents && dimPastEvents && listEvent.isPastEvent && !isPrintVersion) {
startTextColor = startTextColor.adjustAlpha(LOW_ALPHA) startTextColor = startTextColor.adjustAlpha(LOWER_ALPHA)
endTextColor = endTextColor.adjustAlpha(LOW_ALPHA) endTextColor = endTextColor.adjustAlpha(LOWER_ALPHA)
} }
} else if (listEvent.startTS <= now && listEvent.endTS >= now && !isPrintVersion) { } else if (listEvent.startTS <= now && listEvent.endTS >= now && !isPrintVersion) {
startTextColor = adjustedPrimaryColor startTextColor = adjustedPrimaryColor
@@ -197,7 +198,7 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
setCompoundDrawablesWithIntrinsicBounds(null, if (position == 0) null else topDivider, null, null) setCompoundDrawablesWithIntrinsicBounds(null, if (position == 0) null else topDivider, null, null)
var color = if (listSection.isToday && !isPrintVersion) adjustedPrimaryColor else textColor var color = if (listSection.isToday && !isPrintVersion) adjustedPrimaryColor else textColor
if (dimPastEvents && listSection.isPastSection && !isPrintVersion) { if (dimPastEvents && listSection.isPastSection && !isPrintVersion) {
color = color.adjustAlpha(LOW_ALPHA) color = color.adjustAlpha(LOWER_ALPHA)
} }
setTextColor(color) setTextColor(color)
} }

View File

@@ -22,6 +22,7 @@ import com.simplemobiletools.commons.extensions.adjustAlpha
import com.simplemobiletools.commons.extensions.setBackgroundColor import com.simplemobiletools.commons.extensions.setBackgroundColor
import com.simplemobiletools.commons.extensions.setText import com.simplemobiletools.commons.extensions.setText
import com.simplemobiletools.commons.extensions.setTextSize import com.simplemobiletools.commons.extensions.setTextSize
import com.simplemobiletools.commons.helpers.LOWER_ALPHA
import org.joda.time.DateTime import org.joda.time.DateTime
import java.util.* import java.util.*
@@ -32,7 +33,7 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi
private val allDayString = context.resources.getString(R.string.all_day) private val allDayString = context.resources.getString(R.string.all_day)
private var events = ArrayList<ListItem>() private var events = ArrayList<ListItem>()
private var textColor = context.config.widgetTextColor private var textColor = context.config.widgetTextColor
private var weakTextColor = textColor.adjustAlpha(LOW_ALPHA) private var weakTextColor = textColor.adjustAlpha(LOWER_ALPHA)
private val replaceDescription = context.config.replaceDescription private val replaceDescription = context.config.replaceDescription
private val dimPastEvents = context.config.dimPastEvents private val dimPastEvents = context.config.dimPastEvents
private var mediumFontSize = context.getWidgetFontSize() private var mediumFontSize = context.getWidgetFontSize()
@@ -157,7 +158,7 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi
override fun onDataSetChanged() { override fun onDataSetChanged() {
textColor = context.config.widgetTextColor textColor = context.config.widgetTextColor
weakTextColor = textColor.adjustAlpha(LOW_ALPHA) weakTextColor = textColor.adjustAlpha(LOWER_ALPHA)
mediumFontSize = context.getWidgetFontSize() mediumFontSize = context.getWidgetFontSize()
val fromTS = DateTime().seconds() - context.config.displayPastEvents * 60 val fromTS = DateTime().seconds() - context.config.displayPastEvents * 60
val toTS = DateTime().plusYears(1).seconds() val toTS = DateTime().plusYears(1).seconds()

View File

@@ -36,4 +36,6 @@ class MyMonthDayPagerAdapter(fm: FragmentManager, private val mCodes: List<Strin
fun printCurrentView(pos: Int) { fun printCurrentView(pos: Int) {
mFragments[pos].printCurrentView() mFragments[pos].printCurrentView()
} }
fun getNewEventDayCode(pos: Int): String = mFragments[pos].getNewEventDayCode()
} }

View File

@@ -389,7 +389,7 @@ fun Context.scheduleCalDAVSync(activate: Boolean) {
fun Context.addDayNumber(rawTextColor: Int, day: DayMonthly, linearLayout: LinearLayout, dayLabelHeight: Int, callback: (Int) -> Unit) { fun Context.addDayNumber(rawTextColor: Int, day: DayMonthly, linearLayout: LinearLayout, dayLabelHeight: Int, callback: (Int) -> Unit) {
var textColor = rawTextColor var textColor = rawTextColor
if (!day.isThisMonth) if (!day.isThisMonth)
textColor = textColor.adjustAlpha(LOW_ALPHA) textColor = textColor.adjustAlpha(LOWER_ALPHA)
(View.inflate(applicationContext, R.layout.day_monthly_number_view, null) as TextView).apply { (View.inflate(applicationContext, R.layout.day_monthly_number_view, null) as TextView).apply {
setTextColor(textColor) setTextColor(textColor)
@@ -456,7 +456,7 @@ fun Context.addDayEvents(day: DayMonthly, linearLayout: LinearLayout, res: Resou
} }
} }
fun Context.getEventListItems(events: List<Event>): ArrayList<ListItem> { fun Context.getEventListItems(events: List<Event>, addSections: Boolean = true): ArrayList<ListItem> {
val listItems = ArrayList<ListItem>(events.size) val listItems = ArrayList<ListItem>(events.size)
val replaceDescription = config.replaceDescription val replaceDescription = config.replaceDescription
@@ -481,7 +481,7 @@ fun Context.getEventListItems(events: List<Event>): ArrayList<ListItem> {
sorted.forEach { sorted.forEach {
val code = Formatter.getDayCodeFromTS(it.startTS) val code = Formatter.getDayCodeFromTS(it.startTS)
if (code != prevCode) { if (code != prevCode && addSections) {
val day = Formatter.getDayTitle(this, code) val day = Formatter.getDayTitle(this, code)
val isToday = day == today val isToday = day == today
val listSection = ListSection(day, code, isToday, !isToday && it.startTS < now) val listSection = ListSection(day, code, isToday, !isToday && it.startTS < now)
@@ -521,7 +521,6 @@ fun Context.refreshCalDAVCalendars(ids: String, showToasts: Boolean) {
} }
Bundle().apply { Bundle().apply {
putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true)
putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true) putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true)
accounts.forEach { accounts.forEach {
ContentResolver.requestSync(it, uri.authority, this) ContentResolver.requestSync(it, uri.authority, this)
@@ -553,3 +552,11 @@ fun Context.printBitmap(bitmap: Bitmap) {
printHelper.orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT printHelper.orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
printHelper.printBitmap(getString(R.string.app_name), bitmap) printHelper.printBitmap(getString(R.string.app_name), bitmap)
} }
fun Context.editEvent(event: ListEvent) {
Intent(this, EventActivity::class.java).apply {
putExtra(EVENT_ID, event.id)
putExtra(EVENT_OCCURRENCE_TS, event.startTS)
startActivity(this)
}
}

View File

@@ -1,6 +1,5 @@
package com.simplemobiletools.calendar.pro.fragments package com.simplemobiletools.calendar.pro.fragments
import android.content.Intent
import android.graphics.drawable.ColorDrawable import android.graphics.drawable.ColorDrawable
import android.os.Bundle import android.os.Bundle
import android.os.Handler import android.os.Handler
@@ -10,13 +9,10 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.activities.EventActivity
import com.simplemobiletools.calendar.pro.activities.MainActivity import com.simplemobiletools.calendar.pro.activities.MainActivity
import com.simplemobiletools.calendar.pro.activities.SimpleActivity import com.simplemobiletools.calendar.pro.activities.SimpleActivity
import com.simplemobiletools.calendar.pro.adapters.EventListAdapter import com.simplemobiletools.calendar.pro.adapters.EventListAdapter
import com.simplemobiletools.calendar.pro.extensions.* import com.simplemobiletools.calendar.pro.extensions.*
import com.simplemobiletools.calendar.pro.helpers.EVENT_ID
import com.simplemobiletools.calendar.pro.helpers.EVENT_OCCURRENCE_TS
import com.simplemobiletools.calendar.pro.helpers.Formatter import com.simplemobiletools.calendar.pro.helpers.Formatter
import com.simplemobiletools.calendar.pro.models.Event import com.simplemobiletools.calendar.pro.models.Event
import com.simplemobiletools.calendar.pro.models.ListEvent import com.simplemobiletools.calendar.pro.models.ListEvent
@@ -119,9 +115,9 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
val currAdapter = mView.calendar_events_list.adapter val currAdapter = mView.calendar_events_list.adapter
if (currAdapter == null || forceRecreation) { if (currAdapter == null || forceRecreation) {
EventListAdapter(activity as SimpleActivity, listItems, true, this, mView.calendar_events_list) { EventListAdapter(activity as SimpleActivity, listItems, true, this, mView.calendar_events_list, true) {
if (it is ListEvent) { if (it is ListEvent) {
editEvent(it) context?.editEvent(it)
} }
}.apply { }.apply {
mView.calendar_events_list.adapter = this mView.calendar_events_list.adapter = this
@@ -169,14 +165,6 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
mView.calendar_empty_list_placeholder.setTextColor(activity!!.config.textColor) mView.calendar_empty_list_placeholder.setTextColor(activity!!.config.textColor)
} }
private fun editEvent(event: ListEvent) {
Intent(context, EventActivity::class.java).apply {
putExtra(EVENT_ID, event.id)
putExtra(EVENT_OCCURRENCE_TS, event.startTS)
startActivity(this)
}
}
private fun fetchPreviousPeriod() { private fun fetchPreviousPeriod() {
val lastPosition = (mView.calendar_events_list.layoutManager as MyLinearLayoutManager).findLastVisibleItemPosition() val lastPosition = (mView.calendar_events_list.layoutManager as MyLinearLayoutManager).findLastVisibleItemPosition()
bottomItemAtRefresh = (mView.calendar_events_list.adapter as EventListAdapter).listItems[lastPosition] bottomItemAtRefresh = (mView.calendar_events_list.adapter as EventListAdapter).listItems[lastPosition]

View File

@@ -6,34 +6,43 @@ import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.RelativeLayout import androidx.constraintlayout.widget.ConstraintLayout
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.activities.MainActivity import com.simplemobiletools.calendar.pro.activities.MainActivity
import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.activities.SimpleActivity
import com.simplemobiletools.calendar.pro.adapters.EventListAdapter
import com.simplemobiletools.calendar.pro.extensions.*
import com.simplemobiletools.calendar.pro.helpers.Config import com.simplemobiletools.calendar.pro.helpers.Config
import com.simplemobiletools.calendar.pro.helpers.DAY_CODE import com.simplemobiletools.calendar.pro.helpers.DAY_CODE
import com.simplemobiletools.calendar.pro.helpers.Formatter import com.simplemobiletools.calendar.pro.helpers.Formatter
import com.simplemobiletools.calendar.pro.helpers.Formatter.YEAR_PATTERN
import com.simplemobiletools.calendar.pro.helpers.MonthlyCalendarImpl import com.simplemobiletools.calendar.pro.helpers.MonthlyCalendarImpl
import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar
import com.simplemobiletools.calendar.pro.interfaces.NavigationListener import com.simplemobiletools.calendar.pro.interfaces.NavigationListener
import com.simplemobiletools.calendar.pro.models.DayMonthly import com.simplemobiletools.calendar.pro.models.DayMonthly
import com.simplemobiletools.calendar.pro.models.Event
import com.simplemobiletools.calendar.pro.models.ListEvent
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import kotlinx.android.synthetic.main.fragment_month_day.*
import kotlinx.android.synthetic.main.fragment_month_day.view.* import kotlinx.android.synthetic.main.fragment_month_day.view.*
import org.joda.time.DateTime import org.joda.time.DateTime
class MonthDayFragment : Fragment(), MonthlyCalendar { class MonthDayFragment : Fragment(), MonthlyCalendar, RefreshRecyclerViewListener {
private var mTextColor = 0
private var mSundayFirst = false private var mSundayFirst = false
private var mShowWeekNumbers = false private var mShowWeekNumbers = false
private var mDayCode = "" private var mDayCode = ""
private var mSelectedDayCode = ""
private var mPackageName = "" private var mPackageName = ""
private var mLastHash = 0L private var mLastHash = 0L
private var mCalendar: MonthlyCalendarImpl? = null private var mCalendar: MonthlyCalendarImpl? = null
private var mListEvents = ArrayList<Event>()
var listener: NavigationListener? = null var listener: NavigationListener? = null
lateinit var mRes: Resources lateinit var mRes: Resources
lateinit var mHolder: RelativeLayout lateinit var mHolder: ConstraintLayout
lateinit var mConfig: Config lateinit var mConfig: Config
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
@@ -42,12 +51,19 @@ class MonthDayFragment : Fragment(), MonthlyCalendar {
mPackageName = activity!!.packageName mPackageName = activity!!.packageName
mHolder = view.month_day_calendar_holder mHolder = view.month_day_calendar_holder
mDayCode = arguments!!.getString(DAY_CODE)!! mDayCode = arguments!!.getString(DAY_CODE)!!
val shownMonthDateTime = Formatter.getDateTimeFromCode(mDayCode)
mHolder.month_day_selected_day_label.apply {
text = getMonthLabel(shownMonthDateTime)
setOnClickListener {
(activity as MainActivity).showGoToDateDialog()
}
}
mConfig = context!!.config mConfig = context!!.config
storeStateVariables() storeStateVariables()
setupButtons() setupButtons()
mCalendar = MonthlyCalendarImpl(this, context!!) mCalendar = MonthlyCalendarImpl(this, context!!)
return view return view
} }
@@ -91,19 +107,85 @@ class MonthDayFragment : Fragment(), MonthlyCalendar {
mLastHash = newHash mLastHash = newHash
activity?.runOnUiThread { activity?.runOnUiThread {
updateDays(days) mHolder.month_day_view_wrapper.updateDays(days, false) {
mSelectedDayCode = it.code
updateVisibleEvents()
}
}
refreshItems()
}
private fun updateVisibleEvents() {
if (activity == null) {
return
}
val filtered = mListEvents.filter {
if (mSelectedDayCode.isEmpty()) {
val shownMonthDateTime = Formatter.getDateTimeFromCode(mDayCode)
val startDateTime = Formatter.getDateTimeFromTS(it.startTS)
shownMonthDateTime.year == startDateTime.year && shownMonthDateTime.monthOfYear == startDateTime.monthOfYear
} else {
Formatter.getDayCodeFromTS(it.startTS) == mSelectedDayCode
}
}
val listItems = activity!!.getEventListItems(filtered, false)
if (mSelectedDayCode.isNotEmpty()) {
mHolder.month_day_selected_day_label.text = Formatter.getDateFromCode(activity!!, mSelectedDayCode, false)
}
activity?.runOnUiThread {
if (activity != null) {
mHolder.month_day_events_list.beVisibleIf(listItems.isNotEmpty())
mHolder.month_day_no_events_placeholder.beVisibleIf(listItems.isEmpty())
val currAdapter = mHolder.month_day_events_list.adapter
if (currAdapter == null) {
EventListAdapter(activity as SimpleActivity, listItems, true, this, month_day_events_list, false) {
if (it is ListEvent) {
activity?.editEvent(it)
}
}.apply {
month_day_events_list.adapter = this
}
} else {
(currAdapter as EventListAdapter).updateListItems(listItems)
}
}
} }
} }
private fun setupButtons() { private fun setupButtons() {
mTextColor = mConfig.textColor val textColor = mConfig.textColor
} mHolder.apply {
month_day_selected_day_label.setTextColor(textColor)
private fun updateDays(days: ArrayList<DayMonthly>) { month_day_no_events_placeholder.setTextColor(textColor)
mHolder.month_day_view_wrapper.updateDays(days, false) {
// (activity as MainActivity).openDayFromMonthly(Formatter.getDateTimeFromCode(it.code))
} }
} }
fun printCurrentView() {} fun printCurrentView() {}
fun getNewEventDayCode() = if (mSelectedDayCode.isEmpty()) mDayCode else mSelectedDayCode
private fun getMonthLabel(shownMonthDateTime: DateTime): String {
var month = Formatter.getMonthName(activity!!, shownMonthDateTime.monthOfYear)
val targetYear = shownMonthDateTime.toString(YEAR_PATTERN)
if (targetYear != DateTime().toString(YEAR_PATTERN)) {
month += " $targetYear"
}
return month
}
override fun refreshItems() {
val startDateTime = Formatter.getLocalDateTimeFromCode(mDayCode).minusWeeks(1)
val endDateTime = startDateTime.plusWeeks(6)
activity?.eventsHelper?.getEvents(startDateTime.seconds(), endDateTime.seconds()) { events ->
mListEvents = events
activity?.runOnUiThread {
updateVisibleEvents()
}
}
}
} }

View File

@@ -139,7 +139,12 @@ class MonthDayFragmentsHolder : MyFragmentHolder(), NavigationListener {
(activity as? MainActivity)?.updateActionBarTitle(getString(R.string.app_launcher_name)) (activity as? MainActivity)?.updateActionBarTitle(getString(R.string.app_launcher_name))
} }
override fun getNewEventDayCode() = if (shouldGoToTodayBeVisible()) currentDayCode else todayDayCode override fun getNewEventDayCode() = (viewPager?.adapter as? MyMonthDayPagerAdapter)?.getNewEventDayCode(viewPager?.currentItem ?: 0)
?: if (shouldGoToTodayBeVisible()) {
currentDayCode
} else {
todayDayCode
}
override fun printView() {} override fun printView() {}
} }

View File

@@ -25,6 +25,8 @@ import com.simplemobiletools.calendar.pro.models.EventWeeklyView
import com.simplemobiletools.calendar.pro.views.MyScrollView import com.simplemobiletools.calendar.pro.views.MyScrollView
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.DAY_SECONDS import com.simplemobiletools.commons.helpers.DAY_SECONDS
import com.simplemobiletools.commons.helpers.HIGHER_ALPHA
import com.simplemobiletools.commons.helpers.LOWER_ALPHA
import com.simplemobiletools.commons.helpers.WEEK_SECONDS import com.simplemobiletools.commons.helpers.WEEK_SECONDS
import com.simplemobiletools.commons.views.MyTextView import com.simplemobiletools.commons.views.MyTextView
import kotlinx.android.synthetic.main.fragment_week.* import kotlinx.android.synthetic.main.fragment_week.*
@@ -449,9 +451,10 @@ class WeekFragment : Fragment(), WeeklyCalendar {
val dayColumn = dayColumns[dayOfWeek] val dayColumn = dayColumns[dayOfWeek]
(inflater.inflate(R.layout.week_event_marker, null, false) as TextView).apply { (inflater.inflate(R.layout.week_event_marker, null, false) as TextView).apply {
var backgroundColor = eventTypeColors.get(event.eventType, primaryColor) var backgroundColor = eventTypeColors.get(event.eventType, primaryColor)
val textColor = backgroundColor.getContrastColor() var textColor = backgroundColor.getContrastColor()
if (dimPastEvents && event.isPastEvent && !isPrintVersion) { if (dimPastEvents && event.isPastEvent && !isPrintVersion) {
backgroundColor = backgroundColor.adjustAlpha(LOW_ALPHA) backgroundColor = backgroundColor.adjustAlpha(LOWER_ALPHA)
textColor = textColor.adjustAlpha(HIGHER_ALPHA)
} }
background = ColorDrawable(backgroundColor) background = ColorDrawable(backgroundColor)
@@ -555,9 +558,10 @@ class WeekFragment : Fragment(), WeeklyCalendar {
private fun addAllDayEvent(event: Event) { private fun addAllDayEvent(event: Event) {
(inflater.inflate(R.layout.week_all_day_event_marker, null, false) as TextView).apply { (inflater.inflate(R.layout.week_all_day_event_marker, null, false) as TextView).apply {
var backgroundColor = eventTypeColors.get(event.eventType, primaryColor) var backgroundColor = eventTypeColors.get(event.eventType, primaryColor)
val textColor = backgroundColor.getContrastColor() var textColor = backgroundColor.getContrastColor()
if (dimPastEvents && event.isPastEvent && !isPrintVersion) { if (dimPastEvents && event.isPastEvent && !isPrintVersion) {
backgroundColor = backgroundColor.adjustAlpha(LOW_ALPHA) backgroundColor = backgroundColor.adjustAlpha(LOWER_ALPHA)
textColor = textColor.adjustAlpha(HIGHER_ALPHA)
} }
background = ColorDrawable(backgroundColor) background = ColorDrawable(backgroundColor)

View File

@@ -13,8 +13,7 @@ import com.simplemobiletools.calendar.pro.extensions.*
import com.simplemobiletools.calendar.pro.models.* import com.simplemobiletools.calendar.pro.models.*
import com.simplemobiletools.calendar.pro.objects.States.isUpdatingCalDAV import com.simplemobiletools.calendar.pro.objects.States.isUpdatingCalDAV
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CALENDAR import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_CALENDAR
import org.joda.time.DateTimeZone import org.joda.time.DateTimeZone
import org.joda.time.format.DateTimeFormat import org.joda.time.format.DateTimeFormat
import java.util.* import java.util.*
@@ -43,6 +42,7 @@ class CalDAVHelper(val context: Context) {
fetchCalDAVCalendarEvents(calendar.id, localEventType.id!!, showToasts) fetchCalDAVCalendarEvents(calendar.id, localEventType.id!!, showToasts)
} }
context.scheduleCalDAVSync(true) context.scheduleCalDAVSync(true)
callback() callback()
} finally { } finally {
@@ -59,13 +59,13 @@ class CalDAVHelper(val context: Context) {
val uri = Calendars.CONTENT_URI val uri = Calendars.CONTENT_URI
val projection = arrayOf( val projection = arrayOf(
Calendars._ID, Calendars._ID,
Calendars.CALENDAR_DISPLAY_NAME, Calendars.CALENDAR_DISPLAY_NAME,
Calendars.ACCOUNT_NAME, Calendars.ACCOUNT_NAME,
Calendars.ACCOUNT_TYPE, Calendars.ACCOUNT_TYPE,
Calendars.OWNER_ACCOUNT, Calendars.OWNER_ACCOUNT,
Calendars.CALENDAR_COLOR, Calendars.CALENDAR_COLOR,
Calendars.CALENDAR_ACCESS_LEVEL) Calendars.CALENDAR_ACCESS_LEVEL)
val selection = if (ids.trim().isNotEmpty()) "${Calendars._ID} IN ($ids)" else null val selection = if (ids.trim().isNotEmpty()) "${Calendars._ID} IN ($ids)" else null
context.queryCursor(uri, projection, selection, showErrors = showToasts) { cursor -> context.queryCursor(uri, projection, selection, showErrors = showToasts) { cursor ->
@@ -83,39 +83,38 @@ class CalDAVHelper(val context: Context) {
return calendars return calendars
} }
// check if the calendars color or title has changed
fun updateCalDAVCalendar(eventType: EventType) { fun updateCalDAVCalendar(eventType: EventType) {
val uri = Calendars.CONTENT_URI val uri = Calendars.CONTENT_URI
val values = fillCalendarContentValues(eventType)
val newUri = ContentUris.withAppendedId(uri, eventType.caldavCalendarId.toLong()) val newUri = ContentUris.withAppendedId(uri, eventType.caldavCalendarId.toLong())
try { val projection = arrayOf(
context.contentResolver.update(newUri, values, null, null) Calendars.CALENDAR_COLOR_KEY,
} catch (e: IllegalArgumentException) { Calendars.CALENDAR_COLOR,
} Calendars.CALENDAR_DISPLAY_NAME
} )
private fun fillCalendarContentValues(eventType: EventType): ContentValues { context.queryCursor(newUri, projection) { cursor ->
val colorKey = getEventTypeColorKey(eventType) val properColorKey = cursor.getIntValue(Calendars.CALENDAR_COLOR_KEY)
return ContentValues().apply { val properColor = cursor.getIntValue(Calendars.CALENDAR_COLOR)
put(Calendars.CALENDAR_COLOR_KEY, colorKey) val displayName = cursor.getStringValue(Calendars.CALENDAR_DISPLAY_NAME)
put(Calendars.CALENDAR_DISPLAY_NAME, eventType.title) if (eventType.color != properColor || displayName != eventType.title) {
} val values = fillCalendarContentValues(properColorKey, displayName)
} try {
context.contentResolver.update(newUri, values, null, null)
@SuppressLint("MissingPermission") eventType.color = properColor
private fun getEventTypeColorKey(eventType: EventType): Int { eventType.title = displayName
val uri = Colors.CONTENT_URI context.eventTypesDB.insertOrUpdate(eventType)
val projection = arrayOf(Colors.COLOR_KEY) } catch (e: IllegalArgumentException) {
val selection = "${Colors.COLOR_TYPE} = ? AND ${Colors.COLOR} = ? AND ${Colors.ACCOUNT_NAME} = ?" }
val selectionArgs = arrayOf(Colors.TYPE_CALENDAR.toString(), eventType.color.toString(), eventType.caldavEmail)
val cursor = context.contentResolver.query(uri, projection, selection, selectionArgs, null)
cursor?.use {
if (cursor.moveToFirst()) {
return cursor.getStringValue(Colors.COLOR_KEY).toInt()
} }
} }
}
return -1 private fun fillCalendarContentValues(colorKey: Int, title: String): ContentValues {
return ContentValues().apply {
put(Calendars.CALENDAR_COLOR_KEY, colorKey)
put(Calendars.CALENDAR_DISPLAY_NAME, title)
}
} }
@SuppressLint("MissingPermission") @SuppressLint("MissingPermission")
@@ -157,21 +156,21 @@ class CalDAVHelper(val context: Context) {
val uri = Events.CONTENT_URI val uri = Events.CONTENT_URI
val projection = arrayOf( val projection = arrayOf(
Events._ID, Events._ID,
Events.TITLE, Events.TITLE,
Events.DESCRIPTION, Events.DESCRIPTION,
Events.DTSTART, Events.DTSTART,
Events.DTEND, Events.DTEND,
Events.DURATION, Events.DURATION,
Events.EXDATE, Events.EXDATE,
Events.ALL_DAY, Events.ALL_DAY,
Events.RRULE, Events.RRULE,
Events.ORIGINAL_ID, Events.ORIGINAL_ID,
Events.ORIGINAL_INSTANCE_TIME, Events.ORIGINAL_INSTANCE_TIME,
Events.EVENT_LOCATION, Events.EVENT_LOCATION,
Events.EVENT_TIMEZONE, Events.EVENT_TIMEZONE,
Events.CALENDAR_TIME_ZONE, Events.CALENDAR_TIME_ZONE,
Events.DELETED) Events.DELETED)
val selection = "${Events.CALENDAR_ID} = $calendarId" val selection = "${Events.CALENDAR_ID} = $calendarId"
context.queryCursor(uri, projection, selection, showErrors = showToasts) { cursor -> context.queryCursor(uri, projection, selection, showErrors = showToasts) { cursor ->
@@ -203,15 +202,15 @@ class CalDAVHelper(val context: Context) {
val reminder3 = reminders.getOrNull(2) val reminder3 = reminders.getOrNull(2)
val importId = getCalDAVEventImportId(calendarId, id) val importId = getCalDAVEventImportId(calendarId, id)
val eventTimeZone = cursor.getStringValue(Events.EVENT_TIMEZONE) val eventTimeZone = cursor.getStringValue(Events.EVENT_TIMEZONE)
?: cursor.getStringValue(Events.CALENDAR_TIME_ZONE) ?: DateTimeZone.getDefault().id ?: cursor.getStringValue(Events.CALENDAR_TIME_ZONE) ?: DateTimeZone.getDefault().id
val source = "$CALDAV-$calendarId" val source = "$CALDAV-$calendarId"
val repeatRule = Parser().parseRepeatInterval(rrule, startTS) val repeatRule = Parser().parseRepeatInterval(rrule, startTS)
val event = Event(null, startTS, endTS, title, location, description, reminder1?.minutes ?: REMINDER_OFF, val event = Event(null, startTS, endTS, title, location, description, reminder1?.minutes ?: REMINDER_OFF,
reminder2?.minutes ?: REMINDER_OFF, reminder3?.minutes ?: REMINDER_OFF, reminder1?.type reminder2?.minutes ?: REMINDER_OFF, reminder3?.minutes ?: REMINDER_OFF, reminder1?.type
?: REMINDER_NOTIFICATION, reminder2?.type ?: REMINDER_NOTIFICATION, reminder3?.type ?: REMINDER_NOTIFICATION, reminder2?.type ?: REMINDER_NOTIFICATION, reminder3?.type
?: REMINDER_NOTIFICATION, repeatRule.repeatInterval, repeatRule.repeatRule, ?: REMINDER_NOTIFICATION, repeatRule.repeatInterval, repeatRule.repeatRule,
repeatRule.repeatLimit, ArrayList(), attendees, importId, eventTimeZone, allDay, eventTypeId, source = source) repeatRule.repeatLimit, ArrayList(), attendees, importId, eventTimeZone, allDay, eventTypeId, source = source)
if (event.getIsAllDay()) { if (event.getIsAllDay()) {
event.startTS = Formatter.getShiftedImportTimestamp(event.startTS) event.startTS = Formatter.getShiftedImportTimestamp(event.startTS)
@@ -241,12 +240,13 @@ class CalDAVHelper(val context: Context) {
} }
// some calendars add repeatable event exceptions with using the "exdate" field, not by creating a child event that is an exception // some calendars add repeatable event exceptions with using the "exdate" field, not by creating a child event that is an exception
// exdate can be stored as "20190216T230000Z", but also as "Europe/Madrid;20201208T000000Z"
val exdate = cursor.getStringValue(Events.EXDATE) ?: "" val exdate = cursor.getStringValue(Events.EXDATE) ?: ""
if (exdate.length > 8) { if (exdate.length > 8) {
val lines = exdate.split("\n") val lines = exdate.split("\n")
for (line in lines) { for (line in lines) {
val dates = line.split(",") val dates = line.split(",")
dates.forEach { dates.filter { it.isNotEmpty() && it[0].isDigit() }.forEach {
if (it.endsWith("Z")) { if (it.endsWith("Z")) {
// convert for example "20190216T230000Z" to "20190217000000" in Slovakia in a weird way // convert for example "20190216T230000Z" to "20190217000000" in Slovakia in a weird way
val formatter = DateTimeFormat.forPattern("yyyyMMdd'T'HHmmss'Z'") val formatter = DateTimeFormat.forPattern("yyyyMMdd'T'HHmmss'Z'")
@@ -469,8 +469,8 @@ class CalDAVHelper(val context: Context) {
val reminders = ArrayList<Reminder>() val reminders = ArrayList<Reminder>()
val uri = Reminders.CONTENT_URI val uri = Reminders.CONTENT_URI
val projection = arrayOf( val projection = arrayOf(
Reminders.MINUTES, Reminders.MINUTES,
Reminders.METHOD) Reminders.METHOD)
val selection = "${Reminders.EVENT_ID} = $eventId" val selection = "${Reminders.EVENT_ID} = $eventId"
context.queryCursor(uri, projection, selection) { cursor -> context.queryCursor(uri, projection, selection) { cursor ->
@@ -490,10 +490,10 @@ class CalDAVHelper(val context: Context) {
val attendees = ArrayList<Attendee>() val attendees = ArrayList<Attendee>()
val uri = Attendees.CONTENT_URI val uri = Attendees.CONTENT_URI
val projection = arrayOf( val projection = arrayOf(
Attendees.ATTENDEE_NAME, Attendees.ATTENDEE_NAME,
Attendees.ATTENDEE_EMAIL, Attendees.ATTENDEE_EMAIL,
Attendees.ATTENDEE_STATUS, Attendees.ATTENDEE_STATUS,
Attendees.ATTENDEE_RELATIONSHIP) Attendees.ATTENDEE_RELATIONSHIP)
val selection = "${Attendees.EVENT_ID} = $eventId" val selection = "${Attendees.EVENT_ID} = $eventId"
context.queryCursor(uri, projection, selection) { cursor -> context.queryCursor(uri, projection, selection) { cursor ->
val name = cursor.getStringValue(Attendees.ATTENDEE_NAME) ?: "" val name = cursor.getStringValue(Attendees.ATTENDEE_NAME) ?: ""

View File

@@ -1,8 +1,8 @@
package com.simplemobiletools.calendar.pro.helpers package com.simplemobiletools.calendar.pro.helpers
const val LOW_ALPHA = .3f
const val MEDIUM_ALPHA = .6f
const val STORED_LOCALLY_ONLY = 0 const val STORED_LOCALLY_ONLY = 0
const val ROW_COUNT = 6
const val COLUMN_COUNT = 7
const val DAY_CODE = "day_code" const val DAY_CODE = "day_code"
const val YEAR_LABEL = "year" const val YEAR_LABEL = "year"
@@ -163,8 +163,8 @@ fun getNowSeconds() = System.currentTimeMillis() / 1000L
fun isWeekend(i: Int, isSundayFirst: Boolean): Boolean { fun isWeekend(i: Int, isSundayFirst: Boolean): Boolean {
return if (isSundayFirst) { return if (isSundayFirst) {
i == 0 || i == 6 i == 0 || i == 6 || i == 7 || i == 13
} else { } else {
i == 5 || i == 6 i == 5 || i == 6 || i == 12 || i == 13
} }
} }

View File

@@ -73,7 +73,7 @@ class IcsImporter(val activity: SimpleActivity) {
continue continue
} }
if (line == BEGIN_EVENT) { if (line.trim() == BEGIN_EVENT) {
resetValues() resetValues()
curEventTypeId = defaultEventTypeId curEventTypeId = defaultEventTypeId
isParsingEvent = true isParsingEvent = true
@@ -134,7 +134,13 @@ class IcsImporter(val activity: SimpleActivity) {
value = value.substring(0, value.length - 1) value = value.substring(0, value.length - 1)
} }
curRepeatExceptions.add(Formatter.getDayCodeFromTS(getTimestamp(value))) if (value.contains(",")) {
value.split(",").forEach { exdate ->
curRepeatExceptions.add(Formatter.getDayCodeFromTS(getTimestamp(exdate)))
}
} else {
curRepeatExceptions.add(Formatter.getDayCodeFromTS(getTimestamp(value)))
}
} else if (line.startsWith(LOCATION)) { } else if (line.startsWith(LOCATION)) {
curLocation = getLocation(line.substring(LOCATION.length).replace("\\,", ",")) curLocation = getLocation(line.substring(LOCATION.length).replace("\\,", ","))
if (curLocation.trim().isEmpty()) { if (curLocation.trim().isEmpty()) {
@@ -145,14 +151,15 @@ class IcsImporter(val activity: SimpleActivity) {
curRecurrenceDayCode = Formatter.getDayCodeFromTS(timestamp) curRecurrenceDayCode = Formatter.getDayCodeFromTS(timestamp)
} else if (line.startsWith(SEQUENCE)) { } else if (line.startsWith(SEQUENCE)) {
isSequence = true isSequence = true
} else if (line == BEGIN_ALARM) { } else if (line.trim() == BEGIN_ALARM) {
isNotificationDescription = true isNotificationDescription = true
} else if (line == END_ALARM) { } else if (line.trim() == END_ALARM) {
if (isProperReminderAction && curReminderTriggerMinutes != REMINDER_OFF) { if (isProperReminderAction && curReminderTriggerMinutes != REMINDER_OFF) {
curReminderMinutes.add(curReminderTriggerMinutes) curReminderMinutes.add(curReminderTriggerMinutes)
curReminderActions.add(curReminderTriggerAction) curReminderActions.add(curReminderTriggerAction)
} }
} else if (line == END_EVENT) { isNotificationDescription = false
} else if (line.trim() == END_EVENT) {
isParsingEvent = false isParsingEvent = false
if (curStart != -1L && curEnd == -1L) { if (curStart != -1L && curEnd == -1L) {
curEnd = curStart curEnd = curStart
@@ -246,17 +253,19 @@ class IcsImporter(val activity: SimpleActivity) {
private fun getTimestamp(fullString: String): Long { private fun getTimestamp(fullString: String): Long {
return try { return try {
if (fullString.startsWith(';')) { when {
val value = fullString.substring(fullString.lastIndexOf(':') + 1).replace(" ", "") fullString.startsWith(';') -> {
if (value.isEmpty()) { val value = fullString.substring(fullString.lastIndexOf(':') + 1).replace(" ", "")
return 0 if (value.isEmpty()) {
} else if (!value.contains("T")) { return 0
curFlags = curFlags or FLAG_ALL_DAY } else if (!value.contains("T")) {
} curFlags = curFlags or FLAG_ALL_DAY
}
Parser().parseDateTimeValue(value) Parser().parseDateTimeValue(value)
} else { }
Parser().parseDateTimeValue(fullString.substring(1)) fullString.startsWith(":") -> Parser().parseDateTimeValue(fullString.substring(1))
else -> Parser().parseDateTimeValue(fullString)
} }
} catch (e: Exception) { } catch (e: Exception) {
activity.showErrorToast(e) activity.showErrorToast(e)

View File

@@ -18,6 +18,7 @@ import com.simplemobiletools.calendar.pro.interfaces.MonthlyCalendar
import com.simplemobiletools.calendar.pro.models.DayMonthly import com.simplemobiletools.calendar.pro.models.DayMonthly
import com.simplemobiletools.calendar.pro.models.Event import com.simplemobiletools.calendar.pro.models.Event
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.MEDIUM_ALPHA
import org.joda.time.DateTime import org.joda.time.DateTime
class MyWidgetMonthlyProvider : AppWidgetProvider() { class MyWidgetMonthlyProvider : AppWidgetProvider() {

View File

@@ -10,9 +10,7 @@ import android.content.Context
import android.os.Build import android.os.Build
import android.os.Handler import android.os.Handler
import android.provider.CalendarContract import android.provider.CalendarContract
import com.simplemobiletools.calendar.pro.extensions.config
import com.simplemobiletools.calendar.pro.extensions.recheckCalDAVCalendars import com.simplemobiletools.calendar.pro.extensions.recheckCalDAVCalendars
import com.simplemobiletools.calendar.pro.extensions.refreshCalDAVCalendars
// based on https://developer.android.com/reference/android/app/job/JobInfo.Builder.html#addTriggerContentUri(android.app.job.JobInfo.TriggerContentUri) // based on https://developer.android.com/reference/android/app/job/JobInfo.Builder.html#addTriggerContentUri(android.app.job.JobInfo.TriggerContentUri)
@TargetApi(Build.VERSION_CODES.N) @TargetApi(Build.VERSION_CODES.N)
@@ -34,13 +32,13 @@ class CalDAVUpdateListener : JobService() {
val uri = CalendarContract.Calendars.CONTENT_URI val uri = CalendarContract.Calendars.CONTENT_URI
JobInfo.Builder(CALDAV_EVENT_CONTENT_JOB, componentName).apply { JobInfo.Builder(CALDAV_EVENT_CONTENT_JOB, componentName).apply {
addTriggerContentUri(JobInfo.TriggerContentUri(uri, JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS)) addTriggerContentUri(JobInfo.TriggerContentUri(uri, JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS))
context.getSystemService(JobScheduler::class.java).schedule(build()) (context.getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler).schedule(build())
} }
} }
fun isScheduled(context: Context): Boolean { fun isScheduled(context: Context): Boolean {
val jobScheduler = context.getSystemService(JobScheduler::class.java) val jobScheduler = context.getSystemService(JobScheduler::class.java)
val jobs = jobScheduler.allPendingJobs ?: return false val jobs = jobScheduler.allPendingJobs
return jobs.any { it.id == CALDAV_EVENT_CONTENT_JOB } return jobs.any { it.id == CALDAV_EVENT_CONTENT_JOB }
} }

View File

@@ -99,10 +99,8 @@ data class Event(
private fun addXthDayInterval(currStart: DateTime, original: Event, forceLastWeekday: Boolean): DateTime { private fun addXthDayInterval(currStart: DateTime, original: Event, forceLastWeekday: Boolean): DateTime {
val day = currStart.dayOfWeek val day = currStart.dayOfWeek
var order = (currStart.dayOfMonth - 1) / 7 var order = (currStart.dayOfMonth - 1) / 7
val properMonth = currStart.withDayOfMonth(7).plusMonths(repeatInterval / MONTH).withDayOfWeek(day) var properMonth = currStart.withDayOfMonth(7).plusMonths(repeatInterval / MONTH).withDayOfWeek(day)
var firstProperDay = properMonth.dayOfMonth % 7 var wantedDay: Int
if (firstProperDay == 0)
firstProperDay = properMonth.dayOfMonth
// check if it should be for example Fourth Monday, or Last Monday // check if it should be for example Fourth Monday, or Last Monday
if (forceLastWeekday && (order == 3 || order == 4)) { if (forceLastWeekday && (order == 3 || order == 4)) {
@@ -112,13 +110,14 @@ data class Event(
order = -1 order = -1
} }
val daysCnt = properMonth.dayOfMonth().maximumValue
var wantedDay = firstProperDay + order * 7
if (wantedDay > daysCnt)
wantedDay -= 7
if (order == -1) { if (order == -1) {
wantedDay = firstProperDay + ((daysCnt - firstProperDay) / 7) * 7 wantedDay = properMonth.dayOfMonth + ((properMonth.dayOfMonth().maximumValue - properMonth.dayOfMonth) / 7) * 7
} else {
wantedDay = properMonth.dayOfMonth + (order - (properMonth.dayOfMonth - 1) / 7) * 7
while (properMonth.dayOfMonth().maximumValue < wantedDay) {
properMonth = properMonth.withDayOfMonth(7).plusMonths(repeatInterval / MONTH).withDayOfWeek(day)
wantedDay = properMonth.dayOfMonth + (order - (properMonth.dayOfMonth - 1) / 7) * 7
}
} }
return properMonth.withDayOfMonth(wantedDay) return properMonth.withDayOfMonth(wantedDay)

View File

@@ -1,9 +1,7 @@
package com.simplemobiletools.calendar.pro.views package com.simplemobiletools.calendar.pro.views
import android.content.Context import android.content.Context
import android.graphics.Canvas import android.graphics.*
import android.graphics.Paint
import android.graphics.RectF
import android.text.TextPaint import android.text.TextPaint
import android.text.TextUtils import android.text.TextUtils
import android.util.AttributeSet import android.util.AttributeSet
@@ -12,10 +10,7 @@ import android.view.View
import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.config
import com.simplemobiletools.calendar.pro.extensions.seconds import com.simplemobiletools.calendar.pro.extensions.seconds
import com.simplemobiletools.calendar.pro.helpers.Formatter import com.simplemobiletools.calendar.pro.helpers.*
import com.simplemobiletools.calendar.pro.helpers.LOW_ALPHA
import com.simplemobiletools.calendar.pro.helpers.MEDIUM_ALPHA
import com.simplemobiletools.calendar.pro.helpers.isWeekend
import com.simplemobiletools.calendar.pro.models.DayMonthly import com.simplemobiletools.calendar.pro.models.DayMonthly
import com.simplemobiletools.calendar.pro.models.Event import com.simplemobiletools.calendar.pro.models.Event
import com.simplemobiletools.calendar.pro.models.MonthViewEvent import com.simplemobiletools.calendar.pro.models.MonthViewEvent
@@ -23,17 +18,20 @@ import com.simplemobiletools.commons.extensions.adjustAlpha
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.getContrastColor import com.simplemobiletools.commons.extensions.getContrastColor
import com.simplemobiletools.commons.extensions.moveLastItemToFront import com.simplemobiletools.commons.extensions.moveLastItemToFront
import com.simplemobiletools.commons.helpers.HIGHER_ALPHA
import com.simplemobiletools.commons.helpers.LOWER_ALPHA
import com.simplemobiletools.commons.helpers.MEDIUM_ALPHA
import org.joda.time.DateTime import org.joda.time.DateTime
import org.joda.time.Days import org.joda.time.Days
// used in the Monthly view fragment, 1 view per screen // used in the Monthly view fragment, 1 view per screen
class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(context, attrs, defStyle) { class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(context, attrs, defStyle) {
private val BG_CORNER_RADIUS = 8f private val BG_CORNER_RADIUS = 8f
private val ROW_COUNT = 6
private var textPaint: Paint private var textPaint: Paint
private var eventTitlePaint: TextPaint private var eventTitlePaint: TextPaint
private var gridPaint: Paint private var gridPaint: Paint
private var circleStrokePaint: Paint
private var config = context.config private var config = context.config
private var dayWidth = 0f private var dayWidth = 0f
private var dayHeight = 0f private var dayHeight = 0f
@@ -53,9 +51,11 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
private var isMonthDayView = false private var isMonthDayView = false
private var allEvents = ArrayList<MonthViewEvent>() private var allEvents = ArrayList<MonthViewEvent>()
private var bgRectF = RectF() private var bgRectF = RectF()
private var dayTextRect = Rect()
private var dayLetters = ArrayList<String>() private var dayLetters = ArrayList<String>()
private var days = ArrayList<DayMonthly>() private var days = ArrayList<DayMonthly>()
private var dayVerticalOffsets = SparseIntArray() private var dayVerticalOffsets = SparseIntArray()
private var selectedDayCoords = Point(-1, -1)
constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0) constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0)
@@ -78,7 +78,13 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
} }
gridPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply { gridPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
color = textColor.adjustAlpha(LOW_ALPHA) color = textColor.adjustAlpha(LOWER_ALPHA)
}
circleStrokePaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
style = Paint.Style.STROKE
strokeWidth = resources.getDimension(R.dimen.circle_stroke_width)
color = primaryColor
} }
val smallerTextSize = resources.getDimensionPixelSize(R.dimen.smaller_text_size) val smallerTextSize = resources.getDimensionPixelSize(R.dimen.smaller_text_size)
@@ -142,7 +148,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
var curId = 0 var curId = 0
for (y in 0 until ROW_COUNT) { for (y in 0 until ROW_COUNT) {
for (x in 0..6) { for (x in 0 until COLUMN_COUNT) {
val day = days.getOrNull(curId) val day = days.getOrNull(curId)
if (day != null) { if (day != null) {
dayVerticalOffsets.put(day.indexOnMonthView, dayVerticalOffsets[day.indexOnMonthView] + weekDaysLetterHeight) dayVerticalOffsets.put(day.indexOnMonthView, dayVerticalOffsets[day.indexOnMonthView] + weekDaysLetterHeight)
@@ -150,11 +156,26 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
val xPos = x * dayWidth + horizontalOffset val xPos = x * dayWidth + horizontalOffset
val yPos = y * dayHeight + verticalOffset val yPos = y * dayHeight + verticalOffset
val xPosCenter = xPos + dayWidth / 2 val xPosCenter = xPos + dayWidth / 2
if (day.isToday && !isPrintVersion) { val dayNumber = day.value.toString()
canvas.drawCircle(xPosCenter, yPos + textPaint.textSize * 0.7f, textPaint.textSize * 0.75f, getCirclePaint(day))
val textPaint = getTextPaint(day)
if (selectedDayCoords.x != -1 && x == selectedDayCoords.x && y == selectedDayCoords.y) {
canvas.drawCircle(xPosCenter, yPos + textPaint.textSize * 0.7f, textPaint.textSize * 0.8f, circleStrokePaint)
if (day.isToday) {
textPaint.color = textColor
}
} else if (day.isToday && !isPrintVersion) {
canvas.drawCircle(xPosCenter, yPos + textPaint.textSize * 0.7f, textPaint.textSize * 0.8f, getCirclePaint(day))
} }
canvas.drawText(day.value.toString(), xPosCenter, yPos + textPaint.textSize, getTextPaint(day)) // mark days with events with a dot
if (isMonthDayView && day.dayEvents.isNotEmpty()) {
getCirclePaint(day).getTextBounds(dayNumber, 0, dayNumber.length, dayTextRect)
val height = dayTextRect.height() * 1.25f
canvas.drawCircle(xPosCenter, yPos + height + textPaint.textSize / 2, textPaint.textSize * 0.2f, getDayEventColor(day.dayEvents.first()))
}
canvas.drawText(dayNumber, xPosCenter, yPos + textPaint.textSize, textPaint)
dayVerticalOffsets.put(day.indexOnMonthView, (verticalOffset + textPaint.textSize * 2).toInt()) dayVerticalOffsets.put(day.indexOnMonthView, (verticalOffset + textPaint.textSize * 2).toInt())
} }
curId++ curId++
@@ -170,7 +191,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
private fun drawGrid(canvas: Canvas) { private fun drawGrid(canvas: Canvas) {
// vertical lines // vertical lines
for (i in 0..6) { for (i in 0 until COLUMN_COUNT) {
var lineX = i * dayWidth var lineX = i * dayWidth
if (showWeekNumbers) { if (showWeekNumbers) {
lineX += horizontalOffset lineX += horizontalOffset
@@ -180,13 +201,13 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
// horizontal lines // horizontal lines
canvas.drawLine(0f, 0f, canvas.width.toFloat(), 0f, gridPaint) canvas.drawLine(0f, 0f, canvas.width.toFloat(), 0f, gridPaint)
for (i in 0..5) { for (i in 0 until ROW_COUNT) {
canvas.drawLine(0f, i * dayHeight + weekDaysLetterHeight, canvas.width.toFloat(), i * dayHeight + weekDaysLetterHeight, gridPaint) canvas.drawLine(0f, i * dayHeight + weekDaysLetterHeight, canvas.width.toFloat(), i * dayHeight + weekDaysLetterHeight, gridPaint)
} }
} }
private fun addWeekDayLetters(canvas: Canvas) { private fun addWeekDayLetters(canvas: Canvas) {
for (i in 0..6) { for (i in 0 until COLUMN_COUNT) {
val xPos = horizontalOffset + (i + 1) * dayWidth - dayWidth / 2 val xPos = horizontalOffset + (i + 1) * dayWidth - dayWidth / 2
var weekDayLetterPaint = textPaint var weekDayLetterPaint = textPaint
if (i == currDayOfWeek && !isPrintVersion) { if (i == currDayOfWeek && !isPrintVersion) {
@@ -231,7 +252,9 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
val xPosCenter = xPos + dayWidth / 2 val xPosCenter = xPos + dayWidth / 2
if (verticalOffset - eventTitleHeight * 2 > dayHeight) { if (verticalOffset - eventTitleHeight * 2 > dayHeight) {
canvas.drawText("...", xPosCenter, yPos + verticalOffset - eventTitleHeight / 2, getTextPaint(days[event.startDayIndex])) val paint = getTextPaint(days[event.startDayIndex])
paint.color = textColor
canvas.drawText("...", xPosCenter, yPos + verticalOffset - eventTitleHeight / 2, paint)
return return
} }
@@ -255,16 +278,16 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
bgRectF.set(bgLeft, bgTop, bgRight, bgBottom) bgRectF.set(bgLeft, bgTop, bgRight, bgBottom)
canvas.drawRoundRect(bgRectF, BG_CORNER_RADIUS, BG_CORNER_RADIUS, getEventBackgroundColor(event, startDayIndex, endDayIndex)) canvas.drawRoundRect(bgRectF, BG_CORNER_RADIUS, BG_CORNER_RADIUS, getEventBackgroundColor(event, startDayIndex, endDayIndex))
drawEventTitle(event, canvas, xPos, yPos + verticalOffset, bgRight - bgLeft - smallPadding) drawEventTitle(event, canvas, xPos, yPos + verticalOffset, bgRight - bgLeft - smallPadding, startDayIndex, endDayIndex)
for (i in 0 until Math.min(event.daysCnt, 7 - event.startDayIndex % 7)) { for (i in 0 until Math.min(event.daysCnt, 7 - event.startDayIndex % 7)) {
dayVerticalOffsets.put(event.startDayIndex + i, verticalOffset + eventTitleHeight + smallPadding * 2) dayVerticalOffsets.put(event.startDayIndex + i, verticalOffset + eventTitleHeight + smallPadding * 2)
} }
} }
private fun drawEventTitle(event: MonthViewEvent, canvas: Canvas, x: Float, y: Float, availableWidth: Float) { private fun drawEventTitle(event: MonthViewEvent, canvas: Canvas, x: Float, y: Float, availableWidth: Float, startDay: DayMonthly, endDay: DayMonthly) {
val ellipsized = TextUtils.ellipsize(event.title, eventTitlePaint, availableWidth - smallPadding, TextUtils.TruncateAt.END) val ellipsized = TextUtils.ellipsize(event.title, eventTitlePaint, availableWidth - smallPadding, TextUtils.TruncateAt.END)
canvas.drawText(event.title, 0, ellipsized.length, x + smallPadding * 2, y, getEventTitlePaint(event)) canvas.drawText(event.title, 0, ellipsized.length, x + smallPadding * 2, y, getEventTitlePaint(event, startDay, endDay))
} }
private fun getTextPaint(startDay: DayMonthly): Paint { private fun getTextPaint(startDay: DayMonthly): Paint {
@@ -299,9 +322,14 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
return getColoredPaint(paintColor) return getColoredPaint(paintColor)
} }
private fun getEventTitlePaint(event: MonthViewEvent): Paint { private fun getEventTitlePaint(event: MonthViewEvent, startDay: DayMonthly, endDay: DayMonthly): Paint {
var paintColor = event.color.getContrastColor()
if ((!startDay.isThisMonth && !endDay.isThisMonth) || (dimPastEvents && event.isPastEvent && !isPrintVersion)) {
paintColor = paintColor.adjustAlpha(HIGHER_ALPHA)
}
val curPaint = Paint(eventTitlePaint) val curPaint = Paint(eventTitlePaint)
curPaint.color = event.color.getContrastColor() curPaint.color = paintColor
return curPaint return curPaint
} }
@@ -315,6 +343,12 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
return curPaint return curPaint
} }
private fun getDayEventColor(event: Event): Paint {
val curPaint = Paint(Paint.ANTI_ALIAS_FLAG)
curPaint.color = event.color
return curPaint
}
private fun initWeekDayLetters() { private fun initWeekDayLetters() {
dayLetters = context.resources.getStringArray(R.array.week_day_letters).toMutableList() as ArrayList<String> dayLetters = context.resources.getStringArray(R.array.week_day_letters).toMutableList() as ArrayList<String>
if (config.isSundayFirst) { if (config.isSundayFirst) {
@@ -369,8 +403,13 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
} }
textPaint.color = textColor textPaint.color = textColor
gridPaint.color = textColor.adjustAlpha(LOW_ALPHA) gridPaint.color = textColor.adjustAlpha(LOWER_ALPHA)
invalidate() invalidate()
initWeekDayLetters() initWeekDayLetters()
} }
fun updateCurrentlySelectedDay(x: Int, y: Int) {
selectedDayCoords = Point(x, y)
invalidate()
}
} }

View File

@@ -6,6 +6,8 @@ import android.view.LayoutInflater
import android.widget.FrameLayout import android.widget.FrameLayout
import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.config
import com.simplemobiletools.calendar.pro.helpers.COLUMN_COUNT
import com.simplemobiletools.calendar.pro.helpers.ROW_COUNT
import com.simplemobiletools.calendar.pro.models.DayMonthly import com.simplemobiletools.calendar.pro.models.DayMonthly
import com.simplemobiletools.commons.extensions.onGlobalLayout import com.simplemobiletools.commons.extensions.onGlobalLayout
import kotlinx.android.synthetic.main.month_view.view.* import kotlinx.android.synthetic.main.month_view.view.*
@@ -36,7 +38,7 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
onGlobalLayout { onGlobalLayout {
if (!wereViewsAdded && days.isNotEmpty()) { if (!wereViewsAdded && days.isNotEmpty()) {
measureSizes() measureSizes()
addViews() addClickableBackgrounds()
monthView.updateDays(days, isMonthDayView) monthView.updateDays(days, isMonthDayView)
} }
} }
@@ -48,7 +50,7 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
dayClickCallback = callback dayClickCallback = callback
days = newDays days = newDays
if (dayWidth != 0f && dayHeight != 0f) { if (dayWidth != 0f && dayHeight != 0f) {
addViews() addClickableBackgrounds()
} }
isMonthDayView = !addEvents isMonthDayView = !addEvents
@@ -69,32 +71,41 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
} }
} }
private fun addViews() { private fun addClickableBackgrounds() {
removeAllViews() removeAllViews()
monthView = inflater.inflate(R.layout.month_view, this).month_view monthView = inflater.inflate(R.layout.month_view, this).month_view
wereViewsAdded = true wereViewsAdded = true
var curId = 0 var curId = 0
for (y in 0..5) { for (y in 0 until ROW_COUNT) {
for (x in 0..6) { for (x in 0 until COLUMN_COUNT) {
val day = days.getOrNull(curId) val day = days.getOrNull(curId)
if (day != null) { if (day != null) {
val xPos = x * dayWidth + horizontalOffset addViewBackground(x, y, day)
val yPos = y * dayHeight + weekDaysLetterHeight
addViewBackground(xPos, yPos, day)
} }
curId++ curId++
} }
} }
} }
private fun addViewBackground(xPos: Float, yPos: Float, day: DayMonthly) { private fun addViewBackground(viewX: Int, viewY: Int, day: DayMonthly) {
val xPos = viewX * dayWidth + horizontalOffset
val yPos = viewY * dayHeight + weekDaysLetterHeight
inflater.inflate(R.layout.month_view_background, this, false).apply { inflater.inflate(R.layout.month_view_background, this, false).apply {
if (isMonthDayView) {
background = null
}
layoutParams.width = dayWidth.toInt() layoutParams.width = dayWidth.toInt()
layoutParams.height = dayHeight.toInt() layoutParams.height = dayHeight.toInt()
x = xPos x = xPos
y = yPos y = yPos
setOnClickListener { setOnClickListener {
dayClickCallback?.invoke(day) dayClickCallback?.invoke(day)
if (isMonthDayView) {
monthView.updateCurrentlySelectedDay(viewX, viewY)
}
} }
addView(this) addView(this)
} }

View File

@@ -8,11 +8,11 @@ import android.util.AttributeSet
import android.view.View import android.view.View
import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.R
import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.config
import com.simplemobiletools.calendar.pro.helpers.MEDIUM_ALPHA
import com.simplemobiletools.calendar.pro.helpers.isWeekend import com.simplemobiletools.calendar.pro.helpers.isWeekend
import com.simplemobiletools.calendar.pro.models.DayYearly import com.simplemobiletools.calendar.pro.models.DayYearly
import com.simplemobiletools.commons.extensions.adjustAlpha import com.simplemobiletools.commons.extensions.adjustAlpha
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.helpers.MEDIUM_ALPHA
import java.util.* import java.util.*
// used for displaying months at Yearly view // used for displaying months at Yearly view

View File

@@ -32,6 +32,27 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/settings_customize_notifications_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/normal_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingRight="@dimen/normal_margin"
android:paddingBottom="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_customize_notifications_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:paddingStart="@dimen/medium_margin"
android:text="@string/customize_notifications" />
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/settings_manage_event_types_holder" android:id="@+id/settings_manage_event_types_holder"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/month_day_calendar_holder" android:id="@+id/month_day_calendar_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -8,6 +10,61 @@
<com.simplemobiletools.calendar.pro.views.MonthViewWrapper <com.simplemobiletools.calendar.pro.views.MonthViewWrapper
android:id="@+id/month_day_view_wrapper" android:id="@+id/month_day_view_wrapper"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/month_day_list_holder"
app:layout_constraintHeight_percent="0.3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</RelativeLayout> <include
android:id="@+id/month_day_view_divider"
layout="@layout/divider"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_below="@+id/month_day_view_wrapper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/month_day_view_wrapper" />
<RelativeLayout
android:id="@+id/month_day_list_holder"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintHeight_percent="0.7"
app:layout_constraintTop_toBottomOf="@+id/month_day_view_divider">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/month_day_selected_day_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/normal_margin"
android:textSize="@dimen/actionbar_text_size"
tools:text="8/5/2021" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/month_day_no_events_placeholder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/month_day_selected_day_label"
android:layout_centerHorizontal="true"
android:alpha="0.8"
android:gravity="center"
android:paddingStart="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:text="@string/no_items_found"
android:textSize="@dimen/bigger_text_size"
android:textStyle="italic"
android:visibility="gone" />
<com.simplemobiletools.commons.views.MyRecyclerView
android:id="@+id/month_day_events_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/month_day_selected_day_label"
android:clipToPadding="false"
android:scrollbars="vertical"
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.simplemobiletools.calendar.pro.views.MonthView <com.simplemobiletools.calendar.pro.views.MonthView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/month_view" android:id="@+id/month_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent" />

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<View <View xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/month_view_background" android:id="@+id/month_view_background"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="?attr/selectableItemBackground"/> android:background="?attr/selectableItemBackground" />

View File

@@ -71,6 +71,7 @@
<string name="second_m">ثاني</string> <string name="second_m">ثاني</string>
<string name="third_m">ثالث</string> <string name="third_m">ثالث</string>
<string name="fourth_m">رابع</string> <string name="fourth_m">رابع</string>
<string name="fifth_m">fifth</string>
<string name="last_m">أخير</string> <string name="last_m">أخير</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">ثاني</string> <string name="second_f">ثاني</string>
<string name="third_f">ثالث</string> <string name="third_f">ثالث</string>
<string name="fourth_f">رابع</string> <string name="fourth_f">رابع</string>
<string name="fifth_f">fifth</string>
<string name="last_f">أخير</string> <string name="last_f">أخير</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">ikinci</string> <string name="second_m">ikinci</string>
<string name="third_m">üçüncü</string> <string name="third_m">üçüncü</string>
<string name="fourth_m">dördüncü</string> <string name="fourth_m">dördüncü</string>
<string name="fifth_m">fifth</string>
<string name="last_m">sonuncu</string> <string name="last_m">sonuncu</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">ikinci</string> <string name="second_f">ikinci</string>
<string name="third_f">üçüncü</string> <string name="third_f">üçüncü</string>
<string name="fourth_f">dördüncü</string> <string name="fourth_f">dördüncü</string>
<string name="fifth_f">fifth</string>
<string name="last_f">sonuncu</string> <string name="last_f">sonuncu</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -75,6 +75,7 @@
<string name="second_m">দ্বিতীয়</string> <string name="second_m">দ্বিতীয়</string>
<string name="third_m">তৃতীয়</string> <string name="third_m">তৃতীয়</string>
<string name="fourth_m">চতুর্থ</string> <string name="fourth_m">চতুর্থ</string>
<string name="fifth_m">fifth</string>
<string name="last_m">শেষ</string> <string name="last_m">শেষ</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -85,6 +86,7 @@
<string name="second_f">দ্বিতীয়</string> <string name="second_f">দ্বিতীয়</string>
<string name="third_f">তৃতীয়</string> <string name="third_f">তৃতীয়</string>
<string name="fourth_f">চতুর্থ</string> <string name="fourth_f">চতুর্থ</string>
<string name="fifth_f">fifth</string>
<string name="last_f">শেষ</string> <string name="last_f">শেষ</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">eil</string> <string name="second_m">eil</string>
<string name="third_m">trede</string> <string name="third_m">trede</string>
<string name="fourth_m">pevare</string> <string name="fourth_m">pevare</string>
<string name="fifth_m">fifth</string>
<string name="last_m">diwezhañ</string> <string name="last_m">diwezhañ</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">eil</string> <string name="second_f">eil</string>
<string name="third_f">trede</string> <string name="third_f">trede</string>
<string name="fourth_f">pevare</string> <string name="fourth_f">pevare</string>
<string name="fifth_f">fifth</string>
<string name="last_f">diwezhañ</string> <string name="last_f">diwezhañ</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">druhý</string> <string name="second_m">druhý</string>
<string name="third_m">třetí</string> <string name="third_m">třetí</string>
<string name="fourth_m">čtvrtý</string> <string name="fourth_m">čtvrtý</string>
<string name="fifth_m">fifth</string>
<string name="last_m">poslední</string> <string name="last_m">poslední</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">druhou</string> <string name="second_f">druhou</string>
<string name="third_f">třetí</string> <string name="third_f">třetí</string>
<string name="fourth_f">čtvrtou</string> <string name="fourth_f">čtvrtou</string>
<string name="fifth_f">fifth</string>
<string name="last_f">poslední</string> <string name="last_f">poslední</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">anden</string> <string name="second_m">anden</string>
<string name="third_m">tredje</string> <string name="third_m">tredje</string>
<string name="fourth_m">fjerde</string> <string name="fourth_m">fjerde</string>
<string name="fifth_m">fifth</string>
<string name="last_m">sidste</string> <string name="last_m">sidste</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">anden</string> <string name="second_f">anden</string>
<string name="third_f">tredje</string> <string name="third_f">tredje</string>
<string name="fourth_f">fjerde</string> <string name="fourth_f">fjerde</string>
<string name="fifth_f">fifth</string>
<string name="last_f">sidste</string> <string name="last_f">sidste</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">zweiten</string> <string name="second_m">zweiten</string>
<string name="third_m">dritten</string> <string name="third_m">dritten</string>
<string name="fourth_m">vierten</string> <string name="fourth_m">vierten</string>
<string name="fifth_m">fifth</string>
<string name="last_m">letzten</string> <string name="last_m">letzten</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">zweiten</string> <string name="second_f">zweiten</string>
<string name="third_f">dritten</string> <string name="third_f">dritten</string>
<string name="fourth_f">vierten</string> <string name="fourth_f">vierten</string>
<string name="fifth_f">fifth</string>
<string name="last_f">letzten</string> <string name="last_f">letzten</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">δεύτερη</string> <string name="second_m">δεύτερη</string>
<string name="third_m">τρίτη</string> <string name="third_m">τρίτη</string>
<string name="fourth_m">τέταρτη</string> <string name="fourth_m">τέταρτη</string>
<string name="fifth_m">fifth</string>
<string name="last_m">τελευταία</string> <string name="last_m">τελευταία</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">δεύτερη</string> <string name="second_f">δεύτερη</string>
<string name="third_f">τρίτη</string> <string name="third_f">τρίτη</string>
<string name="fourth_f">τέταρτη</string> <string name="fourth_f">τέταρτη</string>
<string name="fifth_f">fifth</string>
<string name="last_f">τελευταία</string> <string name="last_f">τελευταία</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">segundo</string> <string name="second_m">segundo</string>
<string name="third_m">tercero</string> <string name="third_m">tercero</string>
<string name="fourth_m">cuarto</string> <string name="fourth_m">cuarto</string>
<string name="fifth_m">fifth</string>
<string name="last_m">último</string> <string name="last_m">último</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">segundo</string> <string name="second_f">segundo</string>
<string name="third_f">tercer</string> <string name="third_f">tercer</string>
<string name="fourth_f">cuarto</string> <string name="fourth_f">cuarto</string>
<string name="fifth_f">fifth</string>
<string name="last_f">último</string> <string name="last_f">último</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">bigarren</string> <string name="second_m">bigarren</string>
<string name="third_m">hirugarren</string> <string name="third_m">hirugarren</string>
<string name="fourth_m">laugarren</string> <string name="fourth_m">laugarren</string>
<string name="fifth_m">fifth</string>
<string name="last_m">azken</string> <string name="last_m">azken</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">bigarren</string> <string name="second_f">bigarren</string>
<string name="third_f">hirugarren</string> <string name="third_f">hirugarren</string>
<string name="fourth_f">laugarren</string> <string name="fourth_f">laugarren</string>
<string name="fifth_f">fifth</string>
<string name="last_f">azken</string> <string name="last_f">azken</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">toinen</string> <string name="second_m">toinen</string>
<string name="third_m">kolmas</string> <string name="third_m">kolmas</string>
<string name="fourth_m">neljäs</string> <string name="fourth_m">neljäs</string>
<string name="fifth_m">fifth</string>
<string name="last_m">viimeinen</string> <string name="last_m">viimeinen</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">toisena</string> <string name="second_f">toisena</string>
<string name="third_f">kolmantena</string> <string name="third_f">kolmantena</string>
<string name="fourth_f">neljäntenä</string> <string name="fourth_f">neljäntenä</string>
<string name="fifth_f">fifth</string>
<string name="last_f">viimeisenä</string> <string name="last_f">viimeisenä</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -72,6 +72,7 @@
<string name="second_m">deuxième</string> <string name="second_m">deuxième</string>
<string name="third_m">troisième</string> <string name="third_m">troisième</string>
<string name="fourth_m">quatrième</string> <string name="fourth_m">quatrième</string>
<string name="fifth_m">fifth</string>
<string name="last_m">dernier</string> <string name="last_m">dernier</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -82,6 +83,7 @@
<string name="second_f">deuxième</string> <string name="second_f">deuxième</string>
<string name="third_f">troisième</string> <string name="third_f">troisième</string>
<string name="fourth_f">quatrième</string> <string name="fourth_f">quatrième</string>
<string name="fifth_f">fifth</string>
<string name="last_f">dernier</string> <string name="last_f">dernier</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">segundo</string> <string name="second_m">segundo</string>
<string name="third_m">terceiro</string> <string name="third_m">terceiro</string>
<string name="fourth_m">cuarto</string> <string name="fourth_m">cuarto</string>
<string name="fifth_m">fifth</string>
<string name="last_m">último</string> <string name="last_m">último</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">segundo</string> <string name="second_f">segundo</string>
<string name="third_f">terceiro</string> <string name="third_f">terceiro</string>
<string name="fourth_f">cuarto</string> <string name="fourth_f">cuarto</string>
<string name="fifth_f">fifth</string>
<string name="last_f">último</string> <string name="last_f">último</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">שני</string> <string name="second_m">שני</string>
<string name="third_m">שלישי</string> <string name="third_m">שלישי</string>
<string name="fourth_m">רביעי</string> <string name="fourth_m">רביעי</string>
<string name="fifth_m">fifth</string>
<string name="last_m">אחרון</string> <string name="last_m">אחרון</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">שניה</string> <string name="second_f">שניה</string>
<string name="third_f">שלישית</string> <string name="third_f">שלישית</string>
<string name="fourth_f">רביעית</string> <string name="fourth_f">רביעית</string>
<string name="fifth_f">fifth</string>
<string name="last_f">אחרונה</string> <string name="last_f">אחרונה</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">second</string> <string name="second_m">second</string>
<string name="third_m">third</string> <string name="third_m">third</string>
<string name="fourth_m">fourth</string> <string name="fourth_m">fourth</string>
<string name="fifth_m">fifth</string>
<string name="last_m">last</string> <string name="last_m">last</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">second</string> <string name="second_f">second</string>
<string name="third_f">third</string> <string name="third_f">third</string>
<string name="fourth_f">fourth</string> <string name="fourth_f">fourth</string>
<string name="fifth_f">fifth</string>
<string name="last_f">last</string> <string name="last_f">last</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">drugi</string> <string name="second_m">drugi</string>
<string name="third_m">treći</string> <string name="third_m">treći</string>
<string name="fourth_m">četvrti</string> <string name="fourth_m">četvrti</string>
<string name="fifth_m">fifth</string>
<string name="last_m">peti</string> <string name="last_m">peti</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">drugi</string> <string name="second_f">drugi</string>
<string name="third_f">treći</string> <string name="third_f">treći</string>
<string name="fourth_f">četvrti</string> <string name="fourth_f">četvrti</string>
<string name="fifth_f">fifth</string>
<string name="last_f">peti</string> <string name="last_f">peti</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">second</string> <string name="second_m">second</string>
<string name="third_m">third</string> <string name="third_m">third</string>
<string name="fourth_m">fourth</string> <string name="fourth_m">fourth</string>
<string name="fifth_m">fifth</string>
<string name="last_m">last</string> <string name="last_m">last</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">second</string> <string name="second_f">second</string>
<string name="third_f">third</string> <string name="third_f">third</string>
<string name="fourth_f">fourth</string> <string name="fourth_f">fourth</string>
<string name="fifth_f">fifth</string>
<string name="last_f">last</string> <string name="last_f">last</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">kedua</string> <string name="second_m">kedua</string>
<string name="third_m">ketiga</string> <string name="third_m">ketiga</string>
<string name="fourth_m">keempat</string> <string name="fourth_m">keempat</string>
<string name="fifth_m">fifth</string>
<string name="last_m">terakhir</string> <string name="last_m">terakhir</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">kedua</string> <string name="second_f">kedua</string>
<string name="third_f">ketiga</string> <string name="third_f">ketiga</string>
<string name="fourth_f">keempat</string> <string name="fourth_f">keempat</string>
<string name="fifth_f">fifth</string>
<string name="last_f">terakhir</string> <string name="last_f">terakhir</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">kedua</string> <string name="second_m">kedua</string>
<string name="third_m">ketiga</string> <string name="third_m">ketiga</string>
<string name="fourth_m">keempat</string> <string name="fourth_m">keempat</string>
<string name="fifth_m">fifth</string>
<string name="last_m">terakhir</string> <string name="last_m">terakhir</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">kedua</string> <string name="second_f">kedua</string>
<string name="third_f">ketiga</string> <string name="third_f">ketiga</string>
<string name="fourth_f">keempat</string> <string name="fourth_f">keempat</string>
<string name="fifth_f">fifth</string>
<string name="last_f">terakhir</string> <string name="last_f">terakhir</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">secondo</string> <string name="second_m">secondo</string>
<string name="third_m">terzo</string> <string name="third_m">terzo</string>
<string name="fourth_m">quarto</string> <string name="fourth_m">quarto</string>
<string name="fifth_m">fifth</string>
<string name="last_m">ultimo</string> <string name="last_m">ultimo</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">secondo</string> <string name="second_f">secondo</string>
<string name="third_f">terzo</string> <string name="third_f">terzo</string>
<string name="fourth_f">quarto</string> <string name="fourth_f">quarto</string>
<string name="fifth_f">fifth</string>
<string name="last_f">ultimo</string> <string name="last_f">ultimo</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">שני</string> <string name="second_m">שני</string>
<string name="third_m">שלישי</string> <string name="third_m">שלישי</string>
<string name="fourth_m">רביעי</string> <string name="fourth_m">רביעי</string>
<string name="fifth_m">fifth</string>
<string name="last_m">אחרון</string> <string name="last_m">אחרון</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">שניה</string> <string name="second_f">שניה</string>
<string name="third_f">שלישית</string> <string name="third_f">שלישית</string>
<string name="fourth_f">רביעית</string> <string name="fourth_f">רביעית</string>
<string name="fifth_f">fifth</string>
<string name="last_f">אחרונה</string> <string name="last_f">אחרונה</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">second</string> <string name="second_m">second</string>
<string name="third_m">third</string> <string name="third_m">third</string>
<string name="fourth_m">fourth</string> <string name="fourth_m">fourth</string>
<string name="fifth_m">fifth</string>
<string name="last_m">last</string> <string name="last_m">last</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">second</string> <string name="second_f">second</string>
<string name="third_f">third</string> <string name="third_f">third</string>
<string name="fourth_f">fourth</string> <string name="fourth_f">fourth</string>
<string name="fifth_f">fifth</string>
<string name="last_f">last</string> <string name="last_f">last</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">두 번째</string> <string name="second_m">두 번째</string>
<string name="third_m">세 번째</string> <string name="third_m">세 번째</string>
<string name="fourth_m">네 번째</string> <string name="fourth_m">네 번째</string>
<string name="fifth_m">fifth</string>
<string name="last_m">마지막</string> <string name="last_m">마지막</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">두 번째</string> <string name="second_f">두 번째</string>
<string name="third_f">세 번째</string> <string name="third_f">세 번째</string>
<string name="fourth_f">네 번째</string> <string name="fourth_f">네 번째</string>
<string name="fifth_f">fifth</string>
<string name="last_f">마지막</string> <string name="last_f">마지막</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">Antrą</string> <string name="second_m">Antrą</string>
<string name="third_m">Trečią</string> <string name="third_m">Trečią</string>
<string name="fourth_m">Ketvirtą</string> <string name="fourth_m">Ketvirtą</string>
<string name="fifth_m">fifth</string>
<string name="last_m">Paskutinę</string> <string name="last_m">Paskutinę</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">Antrą</string> <string name="second_f">Antrą</string>
<string name="third_f">Trečią</string> <string name="third_f">Trečią</string>
<string name="fourth_f">Ketvirtą</string> <string name="fourth_f">Ketvirtą</string>
<string name="fifth_f">fifth</string>
<string name="last_f">Paskutinę</string> <string name="last_f">Paskutinę</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">2.</string> <string name="second_m">2.</string>
<string name="third_m">3.</string> <string name="third_m">3.</string>
<string name="fourth_m">4.</string> <string name="fourth_m">4.</string>
<string name="fifth_m">fifth</string>
<string name="last_m">pēdēj.</string> <string name="last_m">pēdēj.</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">2.</string> <string name="second_f">2.</string>
<string name="third_f">3.</string> <string name="third_f">3.</string>
<string name="fourth_f">4.</string> <string name="fourth_f">4.</string>
<string name="fifth_f">fifth</string>
<string name="last_f">pēdēj.</string> <string name="last_f">pēdēj.</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">andre</string> <string name="second_m">andre</string>
<string name="third_m">tredje</string> <string name="third_m">tredje</string>
<string name="fourth_m">fjerde</string> <string name="fourth_m">fjerde</string>
<string name="fifth_m">fifth</string>
<string name="last_m">siste</string> <string name="last_m">siste</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">andre</string> <string name="second_f">andre</string>
<string name="third_f">tredje</string> <string name="third_f">tredje</string>
<string name="fourth_f">fjerde</string> <string name="fourth_f">fjerde</string>
<string name="fifth_f">fifth</string>
<string name="last_f">siste</string> <string name="last_f">siste</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">tweede</string> <string name="second_m">tweede</string>
<string name="third_m">derde</string> <string name="third_m">derde</string>
<string name="fourth_m">vierde</string> <string name="fourth_m">vierde</string>
<string name="fifth_m">vijfde</string>
<string name="last_m">laatste</string> <string name="last_m">laatste</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">tweede</string> <string name="second_f">tweede</string>
<string name="third_f">derde</string> <string name="third_f">derde</string>
<string name="fourth_f">vierde</string> <string name="fourth_f">vierde</string>
<string name="fifth_f">vijfde</string>
<string name="last_f">laatste</string> <string name="last_f">laatste</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">andre</string> <string name="second_m">andre</string>
<string name="third_m">tredje</string> <string name="third_m">tredje</string>
<string name="fourth_m">fjerde</string> <string name="fourth_m">fjerde</string>
<string name="fifth_m">fifth</string>
<string name="last_m">siste</string> <string name="last_m">siste</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">andre</string> <string name="second_f">andre</string>
<string name="third_f">tredje</string> <string name="third_f">tredje</string>
<string name="fourth_f">fjerde</string> <string name="fourth_f">fjerde</string>
<string name="fifth_f">fifth</string>
<string name="last_f">siste</string> <string name="last_f">siste</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">drugi(ą)</string> <string name="second_m">drugi(ą)</string>
<string name="third_m">trzeci(ą)</string> <string name="third_m">trzeci(ą)</string>
<string name="fourth_m">czwarty(ą)</string> <string name="fourth_m">czwarty(ą)</string>
<string name="fifth_m">fifth</string>
<string name="last_m">ostatni(ą)</string> <string name="last_m">ostatni(ą)</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">drugi(ą)</string> <string name="second_f">drugi(ą)</string>
<string name="third_f">trzeci(ą)</string> <string name="third_f">trzeci(ą)</string>
<string name="fourth_f">czwarty(ą)</string> <string name="fourth_f">czwarty(ą)</string>
<string name="fifth_f">fifth</string>
<string name="last_f">ostatni(ą)</string> <string name="last_f">ostatni(ą)</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">segundo</string> <string name="second_m">segundo</string>
<string name="third_m">terceiro</string> <string name="third_m">terceiro</string>
<string name="fourth_m">quarto</string> <string name="fourth_m">quarto</string>
<string name="fifth_m">fifth</string>
<string name="last_m">último</string> <string name="last_m">último</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">segundo</string> <string name="second_f">segundo</string>
<string name="third_f">terceiro</string> <string name="third_f">terceiro</string>
<string name="fourth_f">quarto</string> <string name="fourth_f">quarto</string>
<string name="fifth_f">fifth</string>
<string name="last_f">ultimo</string> <string name="last_f">ultimo</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -6,10 +6,10 @@
<string name="daily_view">Vista diária</string> <string name="daily_view">Vista diária</string>
<string name="weekly_view">Vista semanal</string> <string name="weekly_view">Vista semanal</string>
<string name="monthly_view">Vista mensal</string> <string name="monthly_view">Vista mensal</string>
<string name="monthly_daily_view">Monthly + daily view</string> <string name="monthly_daily_view">Mensal + vista diária</string>
<string name="yearly_view">Vista anual</string> <string name="yearly_view">Vista anual</string>
<string name="simple_event_list">Lista de eventos</string> <string name="simple_event_list">Lista de eventos</string>
<string name="no_upcoming_events">Parece que você não tem eventos para breve</string> <string name="no_upcoming_events">Parece que não existem eventos para breve</string>
<string name="go_to_today">Ir para hoje</string> <string name="go_to_today">Ir para hoje</string>
<string name="go_to_date">Ir para data</string> <string name="go_to_date">Ir para data</string>
<string name="upgraded_from_free">Olá,\n\nparece que você utilizou a opção de atualização existente na versão antiga. Tem que migrar os eventos locais através de exportação para um ficheiro .ics e posterior importação. Pode encontrar os botões de exportação/importação no ecrã do menu principal.\n\nDepois já poderá desinstalar a aplicação antiga. Também terá que repor as predefinições da aplicação.\n\nObrigado!</string> <string name="upgraded_from_free">Olá,\n\nparece que você utilizou a opção de atualização existente na versão antiga. Tem que migrar os eventos locais através de exportação para um ficheiro .ics e posterior importação. Pode encontrar os botões de exportação/importação no ecrã do menu principal.\n\nDepois já poderá desinstalar a aplicação antiga. Também terá que repor as predefinições da aplicação.\n\nObrigado!</string>
@@ -71,6 +71,7 @@
<string name="second_m">segunda</string> <string name="second_m">segunda</string>
<string name="third_m">terceira</string> <string name="third_m">terceira</string>
<string name="fourth_m">quarta</string> <string name="fourth_m">quarta</string>
<string name="fifth_m">fifth</string>
<string name="last_m">última</string> <string name="last_m">última</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">segundo</string> <string name="second_f">segundo</string>
<string name="third_f">terceiro</string> <string name="third_f">terceiro</string>
<string name="fourth_f">quarto</string> <string name="fourth_f">quarto</string>
<string name="fifth_f">fifth</string>
<string name="last_f">último</string> <string name="last_f">último</string>
<!-- Birthdays --> <!-- Birthdays -->
@@ -144,7 +146,7 @@
<string name="select_event_type">Selecione um tipo de evento</string> <string name="select_event_type">Selecione um tipo de evento</string>
<string name="move_events_into_default">Mover eventos afetados para o tipo de evento padrão</string> <string name="move_events_into_default">Mover eventos afetados para o tipo de evento padrão</string>
<string name="remove_affected_events">Remover permanentemente os eventos afetados</string> <string name="remove_affected_events">Remover permanentemente os eventos afetados</string>
<string name="unsync_caldav_calendar">Para remover um calendário CalDAV, tem que cancelar a sua sincronização</string> <string name="unsync_caldav_calendar">Para remover um calendário CalDAV, tem que cancelar a sincronização</string>
<!-- Holidays --> <!-- Holidays -->
<string name="holidays">Feriados</string> <string name="holidays">Feriados</string>

View File

@@ -71,6 +71,7 @@
<string name="second_m">a doua</string> <string name="second_m">a doua</string>
<string name="third_m">a treia</string> <string name="third_m">a treia</string>
<string name="fourth_m">a patra</string> <string name="fourth_m">a patra</string>
<string name="fifth_m">fifth</string>
<string name="last_m">ultima</string> <string name="last_m">ultima</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">a doua</string> <string name="second_f">a doua</string>
<string name="third_f">a treia</string> <string name="third_f">a treia</string>
<string name="fourth_f">a patra</string> <string name="fourth_f">a patra</string>
<string name="fifth_f">fifth</string>
<string name="last_f">ultima</string> <string name="last_f">ultima</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">второй</string> <string name="second_m">второй</string>
<string name="third_m">третий</string> <string name="third_m">третий</string>
<string name="fourth_m">четвёртый</string> <string name="fourth_m">четвёртый</string>
<string name="fifth_m">fifth</string>
<string name="last_m">последний</string> <string name="last_m">последний</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">вторую</string> <string name="second_f">вторую</string>
<string name="third_f">третью</string> <string name="third_f">третью</string>
<string name="fourth_f">четвёртую</string> <string name="fourth_f">четвёртую</string>
<string name="fifth_f">fifth</string>
<string name="last_f">последнюю</string> <string name="last_f">последнюю</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">druhý</string> <string name="second_m">druhý</string>
<string name="third_m">tretí</string> <string name="third_m">tretí</string>
<string name="fourth_m">štvrtý</string> <string name="fourth_m">štvrtý</string>
<string name="fifth_m">piaty</string>
<string name="last_m">posledný</string> <string name="last_m">posledný</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">druhú</string> <string name="second_f">druhú</string>
<string name="third_f">tretiu</string> <string name="third_f">tretiu</string>
<string name="fourth_f">štvrtú</string> <string name="fourth_f">štvrtú</string>
<string name="fifth_f">piatu</string>
<string name="last_f">poslednú</string> <string name="last_f">poslednú</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">andra</string> <string name="second_m">andra</string>
<string name="third_m">tredje</string> <string name="third_m">tredje</string>
<string name="fourth_m">fjärde</string> <string name="fourth_m">fjärde</string>
<string name="fifth_m">fifth</string>
<string name="last_m">sista</string> <string name="last_m">sista</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">andra</string> <string name="second_f">andra</string>
<string name="third_f">tredje</string> <string name="third_f">tredje</string>
<string name="fourth_f">fjärde</string> <string name="fourth_f">fjärde</string>
<string name="fifth_f">fifth</string>
<string name="last_f">sista</string> <string name="last_f">sista</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">ikinci</string> <string name="second_m">ikinci</string>
<string name="third_m">üçüncü</string> <string name="third_m">üçüncü</string>
<string name="fourth_m">dördüncü</string> <string name="fourth_m">dördüncü</string>
<string name="fifth_m">fifth</string>
<string name="last_m">son</string> <string name="last_m">son</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">ikinci</string> <string name="second_f">ikinci</string>
<string name="third_f">üçüncü</string> <string name="third_f">üçüncü</string>
<string name="fourth_f">dördüncü</string> <string name="fourth_f">dördüncü</string>
<string name="fifth_f">fifth</string>
<string name="last_f">son</string> <string name="last_f">son</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">другий</string> <string name="second_m">другий</string>
<string name="third_m">третій</string> <string name="third_m">третій</string>
<string name="fourth_m">четвертий</string> <string name="fourth_m">четвертий</string>
<string name="fifth_m">fifth</string>
<string name="last_m">останній</string> <string name="last_m">останній</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">другий</string> <string name="second_f">другий</string>
<string name="third_f">третій</string> <string name="third_f">третій</string>
<string name="fourth_f">четвертий</string> <string name="fourth_f">четвертий</string>
<string name="fifth_f">fifth</string>
<string name="last_f">останній</string> <string name="last_f">останній</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
    <string name="second_m">第二个</string>     <string name="second_m">第二个</string>
    <string name="third_m">第三个</string>     <string name="third_m">第三个</string>
    <string name="fourth_m">第四个</string>     <string name="fourth_m">第四个</string>
<string name="fifth_m">fifth</string>
    <string name="last_m">最后的</string>     <string name="last_m">最后的</string>
    <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->     <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
    <string name="second_f">第二个</string>     <string name="second_f">第二个</string>
    <string name="third_f">第三个</string>     <string name="third_f">第三个</string>
    <string name="fourth_f">第四个</string>     <string name="fourth_f">第四个</string>
<string name="fifth_f">fifth</string>
    <string name="last_f">最后的</string>     <string name="last_f">最后的</string>
    <!-- Birthdays -->     <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">第二個</string> <string name="second_m">第二個</string>
<string name="third_m">第三個</string> <string name="third_m">第三個</string>
<string name="fourth_m">第四個</string> <string name="fourth_m">第四個</string>
<string name="fifth_m">fifth</string>
<string name="last_m">最後的</string> <string name="last_m">最後的</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">第二個</string> <string name="second_f">第二個</string>
<string name="third_f">第三個</string> <string name="third_f">第三個</string>
<string name="fourth_f">第四個</string> <string name="fourth_f">第四個</string>
<string name="fifth_f">fifth</string>
<string name="last_f">最後的</string> <string name="last_f">最後的</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -71,6 +71,7 @@
<string name="second_m">第二個</string> <string name="second_m">第二個</string>
<string name="third_m">第三個</string> <string name="third_m">第三個</string>
<string name="fourth_m">第四個</string> <string name="fourth_m">第四個</string>
<string name="fifth_m">fifth</string>
<string name="last_m">最後的</string> <string name="last_m">最後的</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">第二個</string> <string name="second_f">第二個</string>
<string name="third_f">第三個</string> <string name="third_f">第三個</string>
<string name="fourth_f">第四個</string> <string name="fourth_f">第四個</string>
<string name="fifth_f">fifth</string>
<string name="last_f">最後的</string> <string name="last_f">最後的</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -3,6 +3,7 @@
<dimen name="yearly_padding_side">10dp</dimen> <dimen name="yearly_padding_side">10dp</dimen>
<dimen name="yearly_padding_half">3dp</dimen> <dimen name="yearly_padding_half">3dp</dimen>
<dimen name="yearly_padding_full">6dp</dimen> <dimen name="yearly_padding_full">6dp</dimen>
<dimen name="circle_stroke_width">2dp</dimen>
<dimen name="monthly_day_height">40dp</dimen> <dimen name="monthly_day_height">40dp</dimen>

View File

@@ -71,6 +71,7 @@
<string name="second_m">second</string> <string name="second_m">second</string>
<string name="third_m">third</string> <string name="third_m">third</string>
<string name="fourth_m">fourth</string> <string name="fourth_m">fourth</string>
<string name="fifth_m">fifth</string>
<string name="last_m">last</string> <string name="last_m">last</string>
<!-- alternative versions for some languages, use the same translations if you are not sure what this means --> <!-- alternative versions for some languages, use the same translations if you are not sure what this means -->
@@ -81,6 +82,7 @@
<string name="second_f">second</string> <string name="second_f">second</string>
<string name="third_f">third</string> <string name="third_f">third</string>
<string name="fourth_f">fourth</string> <string name="fourth_f">fourth</string>
<string name="fifth_f">fifth</string>
<string name="last_f">last</string> <string name="last_f">last</string>
<!-- Birthdays --> <!-- Birthdays -->

View File

@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.4.30' ext.kotlin_version = '1.4.31'
repositories { repositories {
google() google()

View File

@@ -0,0 +1,6 @@
* Added a new combination of monthly + daily view
* Fixed too big background activity with CalDAV sync enabled
* Fixed some glitches at importing .ics files
* Fixed a glitch at new events having wrong date set by default in some cases
* Added a setting item for quick notification customizing on Android 8+
* Added some translation and stability improvements

View File

@@ -0,0 +1,3 @@
* Allow repeating events every fifth weekday
* Properly highlight weekends on widgets, if selected so
* Fixed some CalDAV syncing and .ics file importing issues