From 81528f2438c4f88c2cf327c2bbe5295148c8ee99 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Fri, 24 Dec 2021 11:57:36 +0100 Subject: [PATCH] Added limiting events on the list widget --- .../activities/WidgetListConfigureActivity.kt | 78 ++++++++++++++++++- .../pro/adapters/EventListWidgetAdapter.kt | 12 ++- .../calendar/pro/databases/EventsDatabase.kt | 16 +++- .../pro/dialogs/CustomPeriodPickerDialog.kt | 35 +++++++++ .../calendar/pro/extensions/Context.kt | 2 + .../calendar/pro/helpers/Constants.kt | 6 ++ .../pro/helpers/MyWidgetListProvider.kt | 75 +++++++++++------- .../calendar/pro/interfaces/WidgetsDao.kt | 22 ++++++ .../calendar/pro/models/Widget.kt | 12 +++ .../calendar/pro/services/WidgetService.kt | 2 +- .../layout/dialog_custom_period_picker.xml | 60 ++++++++++++++ .../main/res/layout/widget_config_list.xml | 27 +++++++ app/src/main/res/values-ar/strings.xml | 19 ++++- app/src/main/res/values-az/strings.xml | 18 +++++ app/src/main/res/values-bn/strings.xml | 18 +++++ app/src/main/res/values-br/strings.xml | 18 +++++ app/src/main/res/values-ca/strings.xml | 17 ++++ app/src/main/res/values-cs/strings.xml | 18 +++++ app/src/main/res/values-da/strings.xml | 17 ++++ app/src/main/res/values-de/strings.xml | 19 ++++- app/src/main/res/values-el/strings.xml | 18 +++++ app/src/main/res/values-eo/strings.xml | 18 +++++ app/src/main/res/values-es/strings.xml | 18 +++++ app/src/main/res/values-et/strings.xml | 17 ++++ app/src/main/res/values-eu/strings.xml | 18 +++++ app/src/main/res/values-fi/strings.xml | 19 ++++- app/src/main/res/values-fr/strings.xml | 17 ++++ app/src/main/res/values-gl/strings.xml | 18 +++++ app/src/main/res/values-hi-rIN/strings.xml | 18 +++++ app/src/main/res/values-hr/strings.xml | 18 +++++ app/src/main/res/values-hu/strings.xml | 19 ++++- app/src/main/res/values-id/strings.xml | 18 +++++ app/src/main/res/values-it/strings.xml | 19 ++++- app/src/main/res/values-iw/strings.xml | 18 +++++ app/src/main/res/values-ja/strings.xml | 18 +++++ app/src/main/res/values-ko/strings.xml | 18 +++++ app/src/main/res/values-lt/strings.xml | 19 ++++- app/src/main/res/values-lv/strings.xml | 19 ++++- app/src/main/res/values-nb-rNO/strings.xml | 19 ++++- app/src/main/res/values-nl/strings.xml | 18 +++++ app/src/main/res/values-pl/strings.xml | 22 +++++- app/src/main/res/values-pt-rBR/strings.xml | 18 +++++ app/src/main/res/values-pt/strings.xml | 18 +++++ app/src/main/res/values-ro/strings.xml | 18 +++++ app/src/main/res/values-ru/strings.xml | 19 ++++- app/src/main/res/values-sk/strings.xml | 18 +++++ app/src/main/res/values-sv/strings.xml | 18 +++++ app/src/main/res/values-tr/strings.xml | 19 ++++- app/src/main/res/values-uk/strings.xml | 18 +++++ app/src/main/res/values-zh-rCN/strings.xml | 19 ++++- app/src/main/res/values-zh-rHK/strings.xml | 18 +++++ app/src/main/res/values-zh-rTW/strings.xml | 18 +++++ app/src/main/res/values/strings.xml | 18 +++++ 53 files changed, 1045 insertions(+), 51 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/CustomPeriodPickerDialog.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/calendar/pro/interfaces/WidgetsDao.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Widget.kt create mode 100644 app/src/main/res/layout/dialog_custom_period_picker.xml diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetListConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetListConfigureActivity.kt index b4e46013a..22f68396c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetListConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/activities/WidgetListConfigureActivity.kt @@ -4,22 +4,27 @@ import android.app.Activity import android.appwidget.AppWidgetManager import android.content.Intent import android.graphics.Color +import android.graphics.drawable.ColorDrawable import android.os.Bundle import android.widget.SeekBar import com.simplemobiletools.calendar.pro.R import com.simplemobiletools.calendar.pro.adapters.EventListAdapter +import com.simplemobiletools.calendar.pro.dialogs.CustomPeriodPickerDialog import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.seconds +import com.simplemobiletools.calendar.pro.extensions.widgetsDB +import com.simplemobiletools.calendar.pro.helpers.* import com.simplemobiletools.calendar.pro.helpers.Formatter -import com.simplemobiletools.calendar.pro.helpers.MyWidgetListProvider import com.simplemobiletools.calendar.pro.models.ListEvent import com.simplemobiletools.calendar.pro.models.ListItem import com.simplemobiletools.calendar.pro.models.ListSectionDay +import com.simplemobiletools.calendar.pro.models.Widget import com.simplemobiletools.commons.dialogs.ColorPickerDialog -import com.simplemobiletools.commons.extensions.adjustAlpha -import com.simplemobiletools.commons.extensions.applyColorFilter -import com.simplemobiletools.commons.extensions.setFillWithStroke +import com.simplemobiletools.commons.dialogs.RadioGroupDialog +import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS +import com.simplemobiletools.commons.helpers.ensureBackgroundThread +import com.simplemobiletools.commons.models.RadioItem import kotlinx.android.synthetic.main.widget_config_list.* import org.joda.time.DateTime import java.util.* @@ -31,6 +36,9 @@ class WidgetListConfigureActivity : SimpleActivity() { private var mBgColor = 0 private var mTextColorWithoutTransparency = 0 private var mTextColor = 0 + private var selectedPeriodOption = 0 + private var selectedPeriodValue: Int? = null + private var selectedPeriodValueType: Int? = null public override fun onCreate(savedInstanceState: Bundle?) { useDynamicTheme = false @@ -51,6 +59,9 @@ class WidgetListConfigureActivity : SimpleActivity() { config_events_list.adapter = this } + period_picker_holder.background = ColorDrawable(config.backgroundColor) + period_picker_value.setOnClickListener { showPeriodSelector() } + config_save.setOnClickListener { saveConfig() } config_bg_color.setOnClickListener { pickBackgroundColor() } config_text_color.setOnClickListener { pickTextColor() } @@ -78,6 +89,11 @@ class WidgetListConfigureActivity : SimpleActivity() { } private fun saveConfig() { + val widget = Widget(null, mWidgetId, calculatePeriod()) + ensureBackgroundThread { + widgetsDB.insertOrUpdate(widget) + } + storeWidgetColors() requestWidgetUpdate() @@ -88,6 +104,60 @@ class WidgetListConfigureActivity : SimpleActivity() { finish() } + private fun calculatePeriod(): Int { + return if (selectedPeriodOption == EVENT_PERIOD_CUSTOM && selectedPeriodValue != null) { + when (selectedPeriodValueType) { + R.id.dialog_radio_days -> selectedPeriodValue!! * DAY + R.id.dialog_radio_weeks -> selectedPeriodValue!! * WEEK + else -> selectedPeriodValue!! * MONTH + } + } else { + selectedPeriodOption + } + } + + private fun showPeriodSelector() { + hideKeyboard() + + val items = ArrayList() + items.add(RadioItem(EVENT_PERIOD_ONE_YEAR, getString(R.string.within_the_next_one_year))) + items.add(RadioItem(EVENT_PERIOD_TODAY, getString(R.string.today_only))) + items.add(RadioItem(EVENT_PERIOD_CUSTOM, getString(R.string.within_the_next))) + + RadioGroupDialog(this, items, selectedPeriodOption, showOKButton = true, cancelCallback = null) { + val option = it as Int + if (option == EVENT_PERIOD_CUSTOM) { + CustomPeriodPickerDialog(this, selectedPeriodValue, selectedPeriodValueType) { value: Int, type: Int -> + updateSelectedPeriod(option, value, type) + } + } else { + updateSelectedPeriod(option) + } + } + } + + private fun updateSelectedPeriod(selectedPeriod: Int, periodValue: Int? = null, periodType: Int? = null) { + selectedPeriodOption = selectedPeriod + when (selectedPeriodOption) { + EVENT_PERIOD_ONE_YEAR -> period_picker_value.setText(R.string.within_the_next_one_year) + EVENT_PERIOD_TODAY -> period_picker_value.setText(R.string.today_only) + else -> { + if (periodValue != null && periodValue != 0 && periodType != null) { + selectedPeriodValue = periodValue + selectedPeriodValueType = periodType + when (periodType) { + R.id.dialog_radio_days -> period_picker_value.setText(resources.getQuantityString(R.plurals.within_the_next_days, periodValue, periodValue)) + R.id.dialog_radio_weeks -> period_picker_value.setText(resources.getQuantityString(R.plurals.within_the_next_weeks, periodValue, periodValue)) + R.id.dialog_radio_months -> period_picker_value.setText(resources.getQuantityString(R.plurals.within_the_next_months, periodValue, periodValue)) + } + } else { + selectedPeriodOption = EVENT_PERIOD_ONE_YEAR + period_picker_value.setText(R.string.within_the_next_one_year) + } + } + } + } + private fun storeWidgetColors() { config.apply { widgetBgColor = mBgColor diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/EventListWidgetAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/EventListWidgetAdapter.kt index a2a00e3c5..6e0304ba3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/EventListWidgetAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/adapters/EventListWidgetAdapter.kt @@ -16,7 +16,7 @@ import com.simplemobiletools.commons.helpers.MEDIUM_ALPHA import org.joda.time.DateTime import java.util.* -class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteViewsFactory { +class EventListWidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsService.RemoteViewsFactory { private val ITEM_EVENT = 0 private val ITEM_SECTION_DAY = 1 private val ITEM_SECTION_MONTH = 2 @@ -159,8 +159,14 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi override fun onDataSetChanged() { initConfigValues() - val fromTS = DateTime().seconds() - context.config.displayPastEvents * 60 - val toTS = DateTime().plusYears(1).seconds() + val period = intent.getIntExtra(EVENT_LIST_PERIOD, EVENT_PERIOD_ONE_YEAR) + val currentDate = DateTime() + val fromTS = currentDate.seconds() - context.config.displayPastEvents * 60 + val toTS = when (period) { + EVENT_PERIOD_ONE_YEAR -> currentDate.plusYears(1).seconds() + EVENT_PERIOD_TODAY -> currentDate.withTime(23, 59, 59, 999).seconds() + else -> currentDate.plusSeconds(period).seconds() + } context.eventsHelper.getEventsSync(fromTS, toTS, applyTypeFilter = true) { val listItems = ArrayList(it.size) val replaceDescription = context.config.replaceDescription diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/databases/EventsDatabase.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/databases/EventsDatabase.kt index 7c7844e21..0d9c4cdbd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/databases/EventsDatabase.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/databases/EventsDatabase.kt @@ -13,11 +13,13 @@ import com.simplemobiletools.calendar.pro.helpers.Converters import com.simplemobiletools.calendar.pro.helpers.REGULAR_EVENT_TYPE_ID import com.simplemobiletools.calendar.pro.interfaces.EventTypesDao import com.simplemobiletools.calendar.pro.interfaces.EventsDao +import com.simplemobiletools.calendar.pro.interfaces.WidgetsDao import com.simplemobiletools.calendar.pro.models.Event import com.simplemobiletools.calendar.pro.models.EventType +import com.simplemobiletools.calendar.pro.models.Widget import java.util.concurrent.Executors -@Database(entities = [Event::class, EventType::class], version = 4) +@Database(entities = [Event::class, EventType::class, Widget::class], version = 5) @TypeConverters(Converters::class) abstract class EventsDatabase : RoomDatabase() { @@ -25,6 +27,8 @@ abstract class EventsDatabase : RoomDatabase() { abstract fun EventTypesDao(): EventTypesDao + abstract fun WidgetsDao(): WidgetsDao + companion object { private var db: EventsDatabase? = null @@ -42,6 +46,7 @@ abstract class EventsDatabase : RoomDatabase() { .addMigrations(MIGRATION_1_2) .addMigrations(MIGRATION_2_3) .addMigrations(MIGRATION_3_4) + .addMigrations(MIGRATION_4_5) .build() db!!.openHelper.setWriteAheadLoggingEnabled(true) } @@ -89,5 +94,14 @@ abstract class EventsDatabase : RoomDatabase() { } } } + + private val MIGRATION_4_5 = object : Migration(4, 5) { + override fun migrate(database: SupportSQLiteDatabase) { + database.apply { + execSQL("CREATE TABLE IF NOT EXISTS `widgets` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `widget_id` INTEGER NOT NULL, `period` INTEGER NOT NULL)") + execSQL("CREATE UNIQUE INDEX IF NOT EXISTS `index_widgets_widget_id` ON `widgets` (`widget_id`)") + } + } + } } } diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/CustomPeriodPickerDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/CustomPeriodPickerDialog.kt new file mode 100644 index 000000000..33b80c8b9 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/dialogs/CustomPeriodPickerDialog.kt @@ -0,0 +1,35 @@ +package com.simplemobiletools.calendar.pro.dialogs + +import android.app.Activity +import android.view.ViewGroup +import androidx.appcompat.app.AlertDialog +import com.simplemobiletools.calendar.pro.R +import com.simplemobiletools.commons.extensions.* +import kotlinx.android.synthetic.main.dialog_custom_period_picker.view.* + +class CustomPeriodPickerDialog(val activity: Activity, val initialValue: Int?, val initialType: Int?, val callback: (value: Int, selectedType: Int) -> Unit) { + var dialog: AlertDialog + var view = (activity.layoutInflater.inflate(R.layout.dialog_custom_period_picker, null) as ViewGroup) + + init { + view.dialog_custom_period_value.setText(initialValue?.toString() ?: "") + view.dialog_radio_view.check(initialType ?: R.id.dialog_radio_days) + dialog = AlertDialog.Builder(activity) + .setPositiveButton(R.string.ok) { dialogInterface, i -> confirmReminder() } + .setNegativeButton(R.string.cancel, null) + .create().apply { + activity.setupDialogStuff(view, this) { + showKeyboard(view.dialog_custom_period_value) + } + } + } + + private fun confirmReminder() { + val value = view.dialog_custom_period_value.value + val type = view.dialog_radio_view.checkedRadioButtonId + val period = Integer.valueOf(if (value.isEmpty()) "0" else value) + callback(period, type) + activity.hideKeyboard() + dialog.dismiss() + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt index 48bcf0dd1..181a66993 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt @@ -32,6 +32,7 @@ import com.simplemobiletools.calendar.pro.helpers.* import com.simplemobiletools.calendar.pro.helpers.Formatter import com.simplemobiletools.calendar.pro.interfaces.EventTypesDao import com.simplemobiletools.calendar.pro.interfaces.EventsDao +import com.simplemobiletools.calendar.pro.interfaces.WidgetsDao import com.simplemobiletools.calendar.pro.models.* import com.simplemobiletools.calendar.pro.receivers.CalDAVSyncReceiver import com.simplemobiletools.calendar.pro.receivers.NotificationReceiver @@ -46,6 +47,7 @@ import java.util.* val Context.config: Config get() = Config.newInstance(applicationContext) val Context.eventsDB: EventsDao get() = EventsDatabase.getInstance(applicationContext).EventsDao() val Context.eventTypesDB: EventTypesDao get() = EventsDatabase.getInstance(applicationContext).EventTypesDao() +val Context.widgetsDB: WidgetsDao get() = EventsDatabase.getInstance(applicationContext).WidgetsDao() val Context.eventsHelper: EventsHelper get() = EventsHelper(this) val Context.calDAVHelper: CalDAVHelper get() = CalDAVHelper(this) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt index a638b3f63..bda3fc564 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/Constants.kt @@ -48,6 +48,12 @@ const val WEEK = 604800 const val MONTH = 2592001 // exact value not taken into account, Joda is used for adding months and years const val YEAR = 31536000 +const val EVENT_PERIOD_ONE_YEAR = 0 +const val EVENT_PERIOD_TODAY = -1 +const val EVENT_PERIOD_CUSTOM = -2 + +const val EVENT_LIST_PERIOD = "event_list_period" + // Shared Preferences const val WEEK_NUMBERS = "week_numbers" const val START_WEEKLY_AT = "start_weekly_at" diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetListProvider.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetListProvider.kt index e63890e4c..38de18ee1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetListProvider.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetListProvider.kt @@ -13,9 +13,11 @@ import com.simplemobiletools.calendar.pro.activities.SplashActivity import com.simplemobiletools.calendar.pro.extensions.config import com.simplemobiletools.calendar.pro.extensions.getWidgetFontSize import com.simplemobiletools.calendar.pro.extensions.launchNewEventIntent +import com.simplemobiletools.calendar.pro.extensions.widgetsDB import com.simplemobiletools.calendar.pro.services.WidgetService import com.simplemobiletools.calendar.pro.services.WidgetServiceEmpty import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.ensureBackgroundThread import org.joda.time.DateTime class MyWidgetListProvider : AppWidgetProvider() { @@ -32,38 +34,42 @@ class MyWidgetListProvider : AppWidgetProvider() { val textColor = context.config.widgetTextColor val appWidgetManager = AppWidgetManager.getInstance(context) ?: return - appWidgetManager.getAppWidgetIds(getComponentName(context)).forEach { - val views = RemoteViews(context.packageName, R.layout.widget_event_list).apply { - applyColorFilter(R.id.widget_event_list_background, context.config.widgetBgColor) - setTextColor(R.id.widget_event_list_empty, textColor) - setTextSize(R.id.widget_event_list_empty, fontSize) + ensureBackgroundThread { + appWidgetManager.getAppWidgetIds(getComponentName(context)).forEach { + val widget = context.widgetsDB.getWidgetWithWidgetId(it) + val views = RemoteViews(context.packageName, R.layout.widget_event_list).apply { + applyColorFilter(R.id.widget_event_list_background, context.config.widgetBgColor) + setTextColor(R.id.widget_event_list_empty, textColor) + setTextSize(R.id.widget_event_list_empty, fontSize) - setTextColor(R.id.widget_event_list_today, textColor) - setTextSize(R.id.widget_event_list_today, fontSize) + setTextColor(R.id.widget_event_list_today, textColor) + setTextSize(R.id.widget_event_list_today, fontSize) + } + + val todayText = Formatter.getLongestDate(getNowSeconds()) + views.setText(R.id.widget_event_list_today, todayText) + + views.setImageViewBitmap(R.id.widget_event_new_event, context.resources.getColoredBitmap(R.drawable.ic_plus_vector, textColor)) + setupIntent(context, views, NEW_EVENT, R.id.widget_event_new_event) + setupIntent(context, views, LAUNCH_CAL, R.id.widget_event_list_today) + + views.setImageViewBitmap(R.id.widget_event_go_to_today, context.resources.getColoredBitmap(R.drawable.ic_today_vector, textColor)) + setupIntent(context, views, GO_TO_TODAY, R.id.widget_event_go_to_today) + + Intent(context, WidgetService::class.java).apply { + putExtra(EVENT_LIST_PERIOD, widget?.period) + data = Uri.parse(this.toUri(Intent.URI_INTENT_SCHEME)) + views.setRemoteAdapter(R.id.widget_event_list, this) + } + + val startActivityIntent = context.getLaunchIntent() ?: Intent(context, SplashActivity::class.java) + val startActivityPendingIntent = PendingIntent.getActivity(context, 0, startActivityIntent, PendingIntent.FLAG_UPDATE_CURRENT) + views.setPendingIntentTemplate(R.id.widget_event_list, startActivityPendingIntent) + views.setEmptyView(R.id.widget_event_list, R.id.widget_event_list_empty) + + appWidgetManager.updateAppWidget(it, views) + appWidgetManager.notifyAppWidgetViewDataChanged(it, R.id.widget_event_list) } - - val todayText = Formatter.getLongestDate(getNowSeconds()) - views.setText(R.id.widget_event_list_today, todayText) - - views.setImageViewBitmap(R.id.widget_event_new_event, context.resources.getColoredBitmap(R.drawable.ic_plus_vector, textColor)) - setupIntent(context, views, NEW_EVENT, R.id.widget_event_new_event) - setupIntent(context, views, LAUNCH_CAL, R.id.widget_event_list_today) - - views.setImageViewBitmap(R.id.widget_event_go_to_today, context.resources.getColoredBitmap(R.drawable.ic_today_vector, textColor)) - setupIntent(context, views, GO_TO_TODAY, R.id.widget_event_go_to_today) - - Intent(context, WidgetService::class.java).apply { - data = Uri.parse(this.toUri(Intent.URI_INTENT_SCHEME)) - views.setRemoteAdapter(R.id.widget_event_list, this) - } - - val startActivityIntent = context.getLaunchIntent() ?: Intent(context, SplashActivity::class.java) - val startActivityPendingIntent = PendingIntent.getActivity(context, 0, startActivityIntent, PendingIntent.FLAG_UPDATE_CURRENT) - views.setPendingIntentTemplate(R.id.widget_event_list, startActivityPendingIntent) - views.setEmptyView(R.id.widget_event_list, R.id.widget_event_list_empty) - - appWidgetManager.updateAppWidget(it, views) - appWidgetManager.notifyAppWidgetViewDataChanged(it, R.id.widget_event_list) } } @@ -86,6 +92,15 @@ class MyWidgetListProvider : AppWidgetProvider() { } } + override fun onDeleted(context: Context?, appWidgetIds: IntArray?) { + super.onDeleted(context, appWidgetIds) + ensureBackgroundThread { + appWidgetIds?.forEach { + context?.widgetsDB?.deleteWidgetId(it) + } + } + } + private fun launchCalenderInDefaultView(context: Context) { (context.getLaunchIntent() ?: Intent(context, SplashActivity::class.java)).apply { putExtra(DAY_CODE, Formatter.getDayCodeFromDateTime(DateTime())) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/interfaces/WidgetsDao.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/interfaces/WidgetsDao.kt new file mode 100644 index 000000000..486ea59fa --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/interfaces/WidgetsDao.kt @@ -0,0 +1,22 @@ +package com.simplemobiletools.calendar.pro.interfaces + +import androidx.room.Dao +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query +import com.simplemobiletools.calendar.pro.models.Widget + +@Dao +interface WidgetsDao { + @Query("SELECT * FROM widgets") + fun getWidgets(): List + + @Query("SELECT * FROM widgets WHERE widget_id = :widgetId") + fun getWidgetWithWidgetId(widgetId: Int): Widget? + + @Insert(onConflict = OnConflictStrategy.REPLACE) + fun insertOrUpdate(widget: Widget): Long + + @Query("DELETE FROM widgets WHERE widget_id = :widgetId") + fun deleteWidgetId(widgetId: Int) +} diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Widget.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Widget.kt new file mode 100644 index 000000000..dd897f0a1 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/models/Widget.kt @@ -0,0 +1,12 @@ +package com.simplemobiletools.calendar.pro.models + +import androidx.room.ColumnInfo +import androidx.room.Entity +import androidx.room.Index +import androidx.room.PrimaryKey + +@Entity(tableName = "widgets", indices = [(Index(value = ["widget_id"], unique = true))]) +data class Widget( + @PrimaryKey(autoGenerate = true) var id: Long?, + @ColumnInfo(name = "widget_id") var widgetId: Int, + @ColumnInfo(name = "period") var period: Int) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/services/WidgetService.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/services/WidgetService.kt index e2216733c..777ce96a6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/services/WidgetService.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/services/WidgetService.kt @@ -5,5 +5,5 @@ import android.widget.RemoteViewsService import com.simplemobiletools.calendar.pro.adapters.EventListWidgetAdapter class WidgetService : RemoteViewsService() { - override fun onGetViewFactory(intent: Intent) = EventListWidgetAdapter(applicationContext) + override fun onGetViewFactory(intent: Intent) = EventListWidgetAdapter(applicationContext, intent) } diff --git a/app/src/main/res/layout/dialog_custom_period_picker.xml b/app/src/main/res/layout/dialog_custom_period_picker.xml new file mode 100644 index 000000000..99780e6ff --- /dev/null +++ b/app/src/main/res/layout/dialog_custom_period_picker.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/widget_config_list.xml b/app/src/main/res/layout/widget_config_list.xml index 5a4cc3d7a..e89097434 100644 --- a/app/src/main/res/layout/widget_config_list.xml +++ b/app/src/main/res/layout/widget_config_list.xml @@ -7,11 +7,38 @@ android:layout_centerHorizontal="true" android:layout_margin="@dimen/activity_margin"> + + + + + + + + غداء مع ماري في الساحة العامة وقت القهوة + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + كيف يمكنني حذف العطلات المنقولة عن طريق زر \"أضف عطلات\"؟ العطلات المضافة بهذه الطريقة تدخل تحت نوع جديد يسمى \"العطلات\". يمكنك الذهاب الى الإعدادات -> إدارة أنواع الأحداث، ثم اضغط مطولا على نوع الحدث واحذفه عن طريق اختيار سلة المهملات. @@ -305,4 +322,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index b8e4abe6e..1ecd7144a 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -246,6 +246,24 @@ Plazada Kofe vaxtı + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types, diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index 8750ac4b7..e8cc4f593 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -250,6 +250,24 @@ প্লাজাতে কফি টাইম + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + আমি কীভাবে \"ছুটি যুক্ত করুন?\" বাটনের মাধ্যমে ইমপোর্ট করা ছুটিগুলি সরিয়ে ফেলতে পারি? \"ছুটির দিন\" নামে নতুন ইভেন্ট টাইপ ইনসার্ট করার মাধ্যমে ছুটির দিন তৈরি হয়। diff --git a/app/src/main/res/values-br/strings.xml b/app/src/main/res/values-br/strings.xml index b9af4ced6..8960b06c2 100644 --- a/app/src/main/res/values-br/strings.xml +++ b/app/src/main/res/values-br/strings.xml @@ -246,6 +246,24 @@ Er c\'hrampouezhti Banne kafe + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types, diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 8c91d823a..79816dbe8 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -227,6 +227,23 @@ Dinar amb Maria A la plaça Hora del cafè + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Com puc eliminar els dies festius importats mitjançant el botó «Afegeix festius»\? Els dies festius creats d\'aquesta manera s\'insereixen en un tipus d\'esdeveniment nou anomenat «Festius». Podeu anar a Configuració -> Gestiona els tipus d\'esdeveniments, prémer durant molt de temps el tipus d\'esdeveniment indicat i suprimir-lo seleccionant la paperera. diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 1c5d8bb75..1962f5ee6 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -246,6 +246,24 @@ V obchodě Čas na kávu + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Jak mohu odstranit svátky importované přes tlačítko \"Přidat svátky\"? Svátky vytvořené touto cestou jsou vloženy pod novým typem události \"Svátky\". Odstranit je můžete přes: Nastavení -> Správa typů událostí -> diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index c9299c01d..4040178d8 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -227,6 +227,23 @@ Frokost med Marie I byen Kaffetid! + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Hvordan kan jeg fjerne helligdage der er importeret med funktionen \"Tilføj helligdage\"? Helligdage oprettet på den måde er indsat under begivenhedstypen \"Helligdage\". Gå til Indstillinger -> Håndter begivenhedstyper. Efter et par sekunders pres på en type kan du slette den ved at klikke på papirkurven. diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index b2c6a9aca..9ecf139b8 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -233,6 +233,23 @@ Essen mit Marie Im Einkaufszentrum Kaffeepause + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Wie kann ich Feiertage löschen, die über „Feiertage hinzufügen“ importiert wurden\? Die über diesen Weg erstellten Feiertage sind als Termintyp „Feiertage“ deklariert. Du kannst in den Einstellungen -> Termintypen verwalten auf den Termintyp gedrückt halten und über das Papierkorbsymbol löschen. @@ -295,4 +312,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index a63ea14e2..774d9ecc1 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -246,6 +246,24 @@ Στην πλατεία Ωρα για καφέ + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Πώς μπορώ να αφαιρέσω τις αργίες που εισήχθησαν μέσω του κουμπιού \"Προσθήκη αργιών\" ; Οι αργίες που δημιουργήθηκαν με τον τρόπο αυτό εισάγονται σε ένα νέο τύπο εκδήλωσης που ονομάζεται \"Αργίες \". Μπορείτε να μεταβείτε στις Ρυθμίσεις -> Διαχείριση τύπων εκδηλώσεων, diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 7426a88d1..bd7bef0a0 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -228,6 +228,24 @@ En la Placo Coffee time + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types, diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index c6c79f292..80a095bd3 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -246,6 +246,24 @@ En la plaza Hora del café + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + ¿Cómo puedo eliminar las festivos importados a través del botón \"Añadir festivos\"? Los eventos creados de esa manera tienen un tipo de evento llamado \"Días Festivos\". Puede seleccionarlos todos desde Ajustes->Gestionar tipos de eventos, diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index c8444e642..97697a360 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -227,6 +227,23 @@ Lunch with Mary In the Plaza Coffee time + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types, diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index dbfdd457c..bfec6b712 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -246,6 +246,24 @@ Garraxi Kafea hartu + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Nola kendu ditzaket \"Gehitu jaiegunak\" botoiarekin inportatutako jaiegunak? Modu horretan sortutako jaiegunak \"Jaiegunak\" deituriko gertaera mota berrian sartzen dira. Joan Ezarpenak -> Kudeatu gertaera motak atalera, diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 5eb6f75a2..627778489 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -231,6 +231,23 @@ Lounas Marian kanssa Kurvin grillillä Kahvitauko + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Kuinka voin poistaa \"Lisää juhlapäivät\"-painikkeella tuotuja juhlapäiviä? Näin luodut juhlapäivät lisätään uuteen tapahtumatyyppiin nimeltä \"Juhlapäivät\". Siirry kohtaan Asetukset -> Hallitse tapahtumatyyppejä, @@ -297,4 +314,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 3401cf796..5970d8350 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -233,6 +233,23 @@ Déjeuner avec Marie Restaurant de la gare RDV au café + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Comment supprimer les évènement importés avec le bouton "Ajouter des jours fériés" \? Les jours fériés ajoutés de cette manière sont du type "Jours fériés". Vous pouvez aller dans "Paramètres" puis "Gestion des types d\'évènements", faire un appui long sur "Jours fériés" et les supprimer en appuyant sur la corbeille. diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index f87209e8b..7328bf773 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -246,6 +246,24 @@ Na praza Hora do café + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Como podo eliminar os días festivos engadidos vía o botón \"Engadir días festivos\"? Os días festivos creados dese xeito insértanse nun tipo de evento chamado \"Festivo\". Podes ir a Axustes -> Xestionar tipo de eventos, diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index 2053b4f54..2973f2085 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -246,6 +246,24 @@ In the Plaza Coffee time + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types, diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 193bec345..68857ab9b 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -246,6 +246,24 @@ U Plaza Vrijeme za kavu + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Kako mogu ukloniti praznike uvezene putem gumba \"Dodaj praznik\"? Praznik koji je stvoren na taj način umetnut je u novu vrstu događaja pod nazivom \"Praznici\". Možete otići u Postavke -> Upravljanje vrstama događaja, diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 0b6f3321d..41162b898 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -233,6 +233,23 @@ Ebéd Máriával A plázában Kávészünet + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Hogyan távolíthatom el az „Ünnepnapok hozzáadása” gombbal importált ünnepnapokat\? Az így létrehozott ünnepnapok az új „Ünnepnapok” eseménytípusba kerül beszúrásra. Menjen a Beállítások -> Eseménytípusok kezelése lehetőséghez, nyomja meg hosszan az eseménytípust, majd törölje a kuka ikon választásával. @@ -252,4 +269,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 13c6945ae..d00e7e0b5 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -246,6 +246,24 @@ Di Mall Waktunya Ngopi + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Bagaimana cara menghapus hari libur yang diimpor via tombol \"Tambah hari libur\"? Hari libur yang dibuat dengan cara tersebut disimpan di dalam kategori acara baru dengan nama \"Hari Libur\". Anda bisa mengunjungi Pengaturan -> Kelola Kategori Acara, diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index fddcdd4f3..afd321799 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -233,6 +233,23 @@ Pranzo con Maria Al ristorante Magione Pausa caffè + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Come posso rimuovere le festività importate tramite il pulsante «Aggiungi festività»\? Le festività create in questo modo sono inseriti in eventi di tipo «Festività». Andare in Impostazioni → Gestisci tipi di eventi, tenere premuto sul tipo desiderato ed eliminarlo selezionando il cestino. @@ -295,4 +312,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 7c4df1720..8b21342f1 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -246,6 +246,24 @@ במלון הפסקת קפה + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types, diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 999f3256b..104dd3421 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -246,6 +246,24 @@ In the Plaza Coffee time + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types, diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index b30a87f0e..61acaa838 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -246,6 +246,24 @@ 논현동 먹자골목 휴식시간 + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + 공휴일 추가 버튼을 통해 불러온 공휴일을 제거하기 위해선 어떻게 해야하나요? 공휴일 추가 버튼을 통해 만든 공휴일은 \"공휴일\"이라는 새 일정 유형에 삽입됩니다. 설정 -> 일정 유형 관리로 이동하여 해당 일정 유형을 길게누르고 휴지통을 선택하여 삭제할 수 있습니다. diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index eb1b86ee7..f23509980 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -227,6 +227,23 @@ Pietūs su Marija Prekybos ir verslo centre Kavos laikas + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Kaip galiu pašalinti šventines dienas, importuotas naudojant mygtuką „Pridėti šventines dienas“\? Tuo būdu sukurtos šventinės dienos yra įterpiamos į naują įvykių tipą, pavadinimu „Šventinės dienos“. Pereikite į „Nustatymai“ -> „Tvarkyti įvykių tipus“, paspauskite ir ilgiau palaikykite ant nurodyto įvykio tipo ir ištrinkite jį baksteldami ant šiukšlinės. @@ -246,4 +263,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 030dcc7b2..cd423351d 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -227,6 +227,23 @@ Vakariņas ar Dačuku Dieva ausī Laiks tējot + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Kā izdzēst svētku dienas, kas importētas, izmantojot pogu \“Pievienot svētkus\”? Šādi izveidotas svētku dienas tiek piešķirts jauns notikumu tips - \“Svētku dienas\”. Dodieties uz sadaļu \"Iestatījumi \" -> \"Notikumu tipu pārvaldīšana/", tad ilgs nospiediens uz āttiecīgā notikuma tipa un tā izdzēšana ar nospiedienu uz /"misenes/". @@ -290,4 +307,4 @@ Nav izdevies uziet kādus tulkojumus? Tie atrodami https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 032e44d8c..297a7b8c6 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -227,6 +227,23 @@ Lunsj med Mari På torget Kaffepause + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Hvordan kan jeg fjerne off. fridager importert via meny - \"Legg til off. fridager\"? Off. fridager opprettet på denne måten settes inn i en ny hendelsestype kalt \"Off. fridager\". Gå til Innstillinger -> Behandle hendelsestyper, @@ -293,4 +310,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index f03b1c42c..afcf494ca 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -246,6 +246,24 @@ Aan de kade Koffietijd + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Hoe kan ik de feestdagen die zijn geïmporteerd via \"Feestdagen toevoegen\" weer verwijderen? Deze feestdagen hebben het afspraaktype \"Feestdagen\". Om de feestdagen te verwijderen, ga naar Instellingen -> Afspraaktypes beheren, diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 2cf06369f..522a2e1f6 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -233,6 +233,26 @@ Kolacja z ukochaną Przy blasku zachodzącego słońca Czas na kawę + + Pokazuj wydarzenia odbywające się: + W ciągu najbliższego roku + Tylko dzisiaj + W ciągu najbliższych… + + W ciągu najbliższego %d dnia + W ciągu najbliższych %d dni + W ciągu najbliższych %d dni + + + W ciągu najbliższego %d tygodnia + W ciągu najbliższych %d tygodni + W ciągu najbliższych %d tygodni + + + W ciągu najbliższego %d miesiąca + W ciągu najbliższych %d miesięcy + W ciągu najbliższych %d miesięcy + Jak mogę usunąć święta zaimportowane przez przycisk „Dodaj święta”? Święta dodane w ten sposób są wprowadzane do nowego typu wydarzeń — „Święta”. Możesz wejść w Ustawienia -> Zarządzaj typami wydarzeń, a następnie przyciśnij długo dany typ wydarzeń i usuń go, wybierając ikonę kosza. @@ -295,4 +315,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index a319d636d..c1521c81c 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -246,6 +246,24 @@ Ir ao mercado Beber um café + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Como posso remover os feriados importados por meio do botão \ "Adicionar feriados \"? Os feriados criados dessa maneira são inseridos em um novo tipo de evento chamado \ "Feriados \". Você pode ir em Configurações -> Gerenciar tipos de eventos, pressione e segure o tipo de evento fornecido e exclua-o selecionando a lixeira. diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index ec20c50e0..7bc938ba5 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -246,6 +246,24 @@ Ir ao mercado Beber um café + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Como posso remover os feriados importados por meio do botão \ "Adicionar feriados \"? Os feriados criados dessa maneira são inseridos em um novo tipo de evento chamado \ "Feriados \". Você pode ir em Configurações -> Gerenciar tipos de eventos, pressione e segure o tipo de evento fornecido e exclua-o selecionando a lixeira. diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 3af119d04..628250a0b 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -246,6 +246,24 @@ În Plaza Timp pentru cafea + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Cum pot elimina sărbătorile importate prin intermediul butonului \"Adaugă sărbători\"? Sărbătorile create îm felul acela sunt introduse într-un tip de event nou numit \"Sărbători\". Puteți să vă duceți în Setări -> Gestionează tipurile de evenimente, diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 32693dec4..148ab9a27 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -227,6 +227,23 @@ Ужин с Машей В КЭТ на Караванной Время для кофе + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + Как удалить праздники, импортированные с помощью кнопки \"Добавить праздники\"? Праздники, созданные таким образом, вставляются в новый тип события, называемый \"Праздники\". Можно перейти в \"Настройки\" -> \"Управление типами событий\", @@ -293,4 +310,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 436bdfd56..1c7cd2f08 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -246,6 +246,24 @@ V supermarkete Káva + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Ako môžem odstrániť sviatky pridané pomocou tlačidla \"Pridať sviatky\"? Sviatky vytvorené daným spôsobom sú pridané do typu udalosti \"Sviatky\". Môžete teda ísť do Nastavenia -> Spravovať typy udalostí, diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index f4a14e60f..b9ebffc32 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -246,6 +246,24 @@ På stranden Kaffedags + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types, diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index ca82b9e99..4470a5f23 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -233,6 +233,23 @@ Merve ile öğle yemeği Şehir meydanında Kahve zamanı + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + \"Tatil ekle\" düğmesiyle içe aktarılan tatilleri nasıl kaldırabilirim? Tatiller, \"Tatiller\" olarak adlandırılan yeni bir etkinlik türüne eklenir. Ayarlar -> Etkinlik Türlerini Yönet\'e gidip, belirlenen etkinlik türüne uzun basıp çöp kutusunu seçerek silebilirsiniz. @@ -297,4 +314,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 97b41a5a0..1f90938dd 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -246,6 +246,24 @@ На Центральній площі Час на каву + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + Як видалити свята, імпортовані з допомогою кнопки \"Додати свята\"? Свята, створені таким чином, групуються в новий тип подій, що називається \"Свята\". Можна перейти в \"Налаштування\" -> \"Керувати типами подій\", diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 65d8cdb32..d87986dbd 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -233,6 +233,23 @@ 跟玛丽共进午餐 在购物商场 休息时间 + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + 我如何移除用[添加节日]按钮所导入的节日? 以这方式建立的节日,会被加进一个叫做「节日」的新活动类型。 @@ -299,4 +316,4 @@         Haven't found some strings? There's more at         https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res     --> - \ No newline at end of file + diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 25a52019d..e24f7e49a 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -246,6 +246,24 @@ 在購物商場 休息時間 + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + 我如何移除用[添加節日]按鈕所匯入的節日? 以這方式建立的節日,會被加進一個叫做「節日」的新活動類型。 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 0d45d5ebb..390c5505f 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -246,6 +246,24 @@ 在購物商場 休息時間 + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + 我如何移除用「添加節日」按鈕所匯入的節日? 以這方式建立的節日,會被加進一個叫做「節日」的新活動類型。 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a4f0d2971..87fdecacf 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -246,6 +246,24 @@ In the Plaza Coffee time + + Show events happening: + Within the next 1 year + Today only + Within the next… + + Within the next %d day + Within the next %d days + + + Within the next %d week + Within the next %d weeks + + + Within the next %d month + Within the next %d months + + How can I remove the holidays imported via the \"Add holidays\" button? Holidays created that way are inserted in a new event type called \"Holidays\". You can go in Settings -> Manage Event Types,