@@ -159,7 +159,14 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
159
159
addBirthdaysAnniversariesAtStart()
160
160
161
161
if (isPackageInstalled(" com.simplemobiletools.calendar" )) {
162
- ConfirmationDialog (this , " " , R .string.upgraded_from_free_calendar, R .string.ok, 0 , false ) {}
162
+ ConfirmationDialog (
163
+ activity = this ,
164
+ message = " " ,
165
+ messageId = com.simplemobiletools.commons.R .string.upgraded_from_free_calendar,
166
+ positive = com.simplemobiletools.commons.R .string.ok,
167
+ negative = 0 ,
168
+ cancelOnTouchOutside = false
169
+ ) {}
163
170
}
164
171
165
172
addImportIdsToTasks {
@@ -247,7 +254,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
247
254
findItem(R .id.go_to_today).isVisible = shouldGoToTodayBeVisible && ! binding.mainMenu.isSearchOpen
248
255
findItem(R .id.go_to_date).isVisible = config.storedView != EVENTS_LIST_VIEW
249
256
findItem(R .id.refresh_caldav_calendars).isVisible = config.caldavSync
250
- findItem(R .id.more_apps_from_us).isVisible = ! resources.getBoolean(R .bool.hide_google_relations)
257
+ findItem(R .id.more_apps_from_us).isVisible = ! resources.getBoolean(com.simplemobiletools.commons. R .bool.hide_google_relations)
251
258
}
252
259
}
253
260
@@ -527,7 +534,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
527
534
}
528
535
529
536
private fun resetActionBarTitle () {
530
- binding.mainMenu.updateHintText(getString(R .string.search))
537
+ binding.mainMenu.updateHintText(getString(com.simplemobiletools.commons. R .string.search))
531
538
}
532
539
533
540
private fun showFilterDialog () {
@@ -585,7 +592,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
585
592
RadioGroupDialog (this , items) { selectedHoliday ->
586
593
SetRemindersDialog (this , OTHER_EVENT ) {
587
594
val reminders = it
588
- toast(R .string.importing)
595
+ toast(com.simplemobiletools.commons. R .string.importing)
589
596
ensureBackgroundThread {
590
597
val holidays = getString(R .string.holidays)
591
598
var eventTypeId = eventsHelper.getEventTypeIdWithClass(HOLIDAY_EVENT )
@@ -631,7 +638,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
631
638
}
632
639
}
633
640
} else {
634
- toast(R .string.no_contacts_permission)
641
+ toast(com.simplemobiletools.commons. R .string.no_contacts_permission)
635
642
}
636
643
}
637
644
}
@@ -662,7 +669,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
662
669
}
663
670
}
664
671
} else {
665
- toast(R .string.no_contacts_permission)
672
+ toast(com.simplemobiletools.commons. R .string.no_contacts_permission)
666
673
}
667
674
}
668
675
}
@@ -705,7 +712,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
705
712
private fun handleParseResult (result : ImportResult ) {
706
713
toast(
707
714
when (result) {
708
- ImportResult .IMPORT_NOTHING_NEW -> R .string.no_new_items
715
+ ImportResult .IMPORT_NOTHING_NEW -> com.simplemobiletools.commons. R .string.no_new_items
709
716
ImportResult .IMPORT_OK -> R .string.holidays_imported_successfully
710
717
ImportResult .IMPORT_PARTIAL -> R .string.importing_some_holidays_failed
711
718
else -> R .string.importing_holidays_failed
@@ -964,7 +971,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
964
971
965
972
private fun animateFabIcon (showPlus : Boolean ) {
966
973
val newDrawableId = if (showPlus) {
967
- R .drawable.ic_plus_vector
974
+ com.simplemobiletools.commons. R .drawable.ic_plus_vector
968
975
} else {
969
976
R .drawable.ic_today_vector
970
977
}
@@ -1071,13 +1078,13 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
1071
1078
try {
1072
1079
startActivityForResult(this , PICK_IMPORT_SOURCE_INTENT )
1073
1080
} catch (e: ActivityNotFoundException ) {
1074
- toast(R .string.system_service_disabled, Toast .LENGTH_LONG )
1081
+ toast(com.simplemobiletools.commons. R .string.system_service_disabled, Toast .LENGTH_LONG )
1075
1082
} catch (e: Exception ) {
1076
1083
showErrorToast(e)
1077
1084
}
1078
1085
}
1079
1086
} else {
1080
- PermissionRequiredDialog (this , R .string.allow_notifications_reminders, { openNotificationSettings() })
1087
+ PermissionRequiredDialog (this , com.simplemobiletools.commons. R .string.allow_notifications_reminders, { openNotificationSettings() })
1081
1088
}
1082
1089
}
1083
1090
} else {
@@ -1101,7 +1108,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
1101
1108
" content" -> {
1102
1109
val tempFile = getTempFile()
1103
1110
if (tempFile == null ) {
1104
- toast(R .string.unknown_error_occurred)
1111
+ toast(com.simplemobiletools.commons. R .string.unknown_error_occurred)
1105
1112
return
1106
1113
}
1107
1114
@@ -1115,7 +1122,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
1115
1122
}
1116
1123
}
1117
1124
1118
- else -> toast(R .string.invalid_file_format)
1125
+ else -> toast(com.simplemobiletools.commons. R .string.invalid_file_format)
1119
1126
}
1120
1127
}
1121
1128
@@ -1144,7 +1151,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
1144
1151
try {
1145
1152
startActivityForResult(this , PICK_EXPORT_FILE_INTENT )
1146
1153
} catch (e: ActivityNotFoundException ) {
1147
- toast(R .string.system_service_disabled, Toast .LENGTH_LONG )
1154
+ toast(com.simplemobiletools.commons. R .string.system_service_disabled, Toast .LENGTH_LONG )
1148
1155
} catch (e: Exception ) {
1149
1156
showErrorToast(e)
1150
1157
}
@@ -1167,14 +1174,14 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
1167
1174
ensureBackgroundThread {
1168
1175
val events = eventsHelper.getEventsToExport(eventTypes, config.exportEvents, config.exportTasks, config.exportPastEntries)
1169
1176
if (events.isEmpty()) {
1170
- toast(R .string.no_entries_for_exporting)
1177
+ toast(com.simplemobiletools.commons. R .string.no_entries_for_exporting)
1171
1178
} else {
1172
1179
IcsExporter (this ).exportEvents(outputStream, events, true ) { result ->
1173
1180
toast(
1174
1181
when (result) {
1175
- ExportResult .EXPORT_OK -> R .string.exporting_successful
1176
- ExportResult .EXPORT_PARTIAL -> R .string.exporting_some_entries_failed
1177
- else -> R .string.exporting_failed
1182
+ ExportResult .EXPORT_OK -> com.simplemobiletools.commons. R .string.exporting_successful
1183
+ ExportResult .EXPORT_PARTIAL -> com.simplemobiletools.commons. R .string.exporting_some_entries_failed
1184
+ else -> com.simplemobiletools.commons. R .string.exporting_failed
1178
1185
}
1179
1186
)
1180
1187
}
@@ -1196,16 +1203,15 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
1196
1203
FAQItem (R .string.faq_3_title, R .string.faq_3_text),
1197
1204
FAQItem (R .string.faq_6_title, R .string.faq_6_text),
1198
1205
FAQItem (R .string.faq_1_title, R .string.faq_1_text),
1199
- FAQItem (R .string.faq_1_title_commons, R .string.faq_1_text_commons),
1200
- FAQItem (R .string.faq_4_title_commons, R .string.faq_4_text_commons),
1206
+ FAQItem (com.simplemobiletools.commons. R .string.faq_1_title_commons, com.simplemobiletools.commons. R .string.faq_1_text_commons),
1207
+ FAQItem (com.simplemobiletools.commons. R .string.faq_4_title_commons, com.simplemobiletools.commons. R .string.faq_4_text_commons),
1201
1208
FAQItem (R .string.faq_4_title, R .string.faq_4_text)
1202
1209
)
1203
1210
1204
- if (! resources.getBoolean(R .bool.hide_google_relations)) {
1205
- faqItems.add(FAQItem (R .string.faq_2_title_commons, R .string.faq_2_text_commons))
1206
- faqItems.add(FAQItem (R .string.faq_6_title_commons, R .string.faq_6_text_commons))
1207
- faqItems.add(FAQItem (R .string.faq_7_title_commons, R .string.faq_7_text_commons))
1208
-
1211
+ if (! resources.getBoolean(com.simplemobiletools.commons.R .bool.hide_google_relations)) {
1212
+ faqItems.add(FAQItem (com.simplemobiletools.commons.R .string.faq_2_title_commons, com.simplemobiletools.commons.R .string.faq_2_text_commons))
1213
+ faqItems.add(FAQItem (com.simplemobiletools.commons.R .string.faq_6_title_commons, com.simplemobiletools.commons.R .string.faq_6_text_commons))
1214
+ faqItems.add(FAQItem (com.simplemobiletools.commons.R .string.faq_7_title_commons, com.simplemobiletools.commons.R .string.faq_7_text_commons))
1209
1215
}
1210
1216
1211
1217
startAboutActivity(R .string.app_name, licenses, BuildConfig .VERSION_NAME , faqItems, true )
@@ -1224,7 +1230,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
1224
1230
val placeholderTextId = if (config.displayEventTypes.isEmpty()) {
1225
1231
R .string.everything_filtered_out
1226
1232
} else {
1227
- R .string.no_items_found
1233
+ com.simplemobiletools.commons. R .string.no_items_found
1228
1234
}
1229
1235
1230
1236
binding.searchPlaceholder.setText(placeholderTextId)
0 commit comments