diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt
index b0f51f1c3..8e8908eaa 100644
--- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt
@@ -16,6 +16,7 @@ import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.adapters.MyMonthPagerAdapter
import com.simplemobiletools.calendar.adapters.MyWeekPagerAdapter
import com.simplemobiletools.calendar.adapters.MyYearPagerAdapter
+import com.simplemobiletools.calendar.dialogs.ExportEventsDialog
import com.simplemobiletools.calendar.dialogs.FilterEventTypesDialog
import com.simplemobiletools.calendar.dialogs.ImportEventsDialog
import com.simplemobiletools.calendar.extensions.*
@@ -259,7 +260,9 @@ class MainActivity : SimpleActivity(), NavigationListener {
private fun exportEvents() {
FilePickerDialog(this, pickFile = false) {
+ ExportEventsDialog(this, it) {
+ }
}
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt
new file mode 100644
index 000000000..4ed812429
--- /dev/null
+++ b/app/src/main/kotlin/com/simplemobiletools/calendar/dialogs/ExportEventsDialog.kt
@@ -0,0 +1,27 @@
+package com.simplemobiletools.calendar.dialogs
+
+import android.app.Activity
+import android.support.v7.app.AlertDialog
+import android.view.ViewGroup
+import com.simplemobiletools.calendar.R
+import com.simplemobiletools.commons.extensions.humanizePath
+import com.simplemobiletools.commons.extensions.setupDialogStuff
+import kotlinx.android.synthetic.main.dialog_export_events.view.*
+
+class ExportEventsDialog(val activity: Activity, val path: String, val callback: (refreshView: Boolean) -> Unit) : AlertDialog.Builder(activity) {
+ init {
+ val view = (activity.layoutInflater.inflate(R.layout.dialog_export_events, null) as ViewGroup).apply {
+ export_events_folder.text = activity.humanizePath(path)
+ }
+
+ AlertDialog.Builder(activity)
+ .setPositiveButton(R.string.ok, null)
+ .setNegativeButton(R.string.cancel, null)
+ .create().apply {
+ activity.setupDialogStuff(view, this, R.string.export_events)
+ getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener({
+
+ })
+ }
+ }
+}
diff --git a/app/src/main/res/layout/dialog_export_events.xml b/app/src/main/res/layout/dialog_export_events.xml
new file mode 100644
index 000000000..bca39e5d7
--- /dev/null
+++ b/app/src/main/res/layout/dialog_export_events.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 330c9bb64..12a831377 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -96,6 +96,7 @@
Importiere Termine
+ Export events
Importiere Termine aus .ics Datei
Termine erfolgreich importiert
Termine importieren fehlgeschlagen
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 69160c43d..48738c691 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -96,6 +96,7 @@
Import events
+ Export events
Import events from an .ics file
Events imported successfully
Importing events failed
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index eeb30bf1c..dfb3bc40f 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -96,6 +96,7 @@
Importer des evénements
+ Export events
Importer des evénements depuis un fichier .ics
Evénements importés avec succès
Import des evénements échoué
diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml
index 149c0bd17..468b09624 100644
--- a/app/src/main/res/values-hi-rIN/strings.xml
+++ b/app/src/main/res/values-hi-rIN/strings.xml
@@ -96,6 +96,7 @@
Import events
+ Export events
Import events from an .ics file
Events imported successfully
Importing events failed
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 995494214..e1951a67d 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -96,6 +96,7 @@
Import events
+ Export events
Import events from an .ics file
Events imported successfully
Importing events failed
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 741950c6f..f080b3636 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -96,6 +96,7 @@
Import events
+ Export events
Import events from an .ics file
Events imported successfully
Importing events failed
diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml
index 87fa9a4da..f3749dbb3 100644
--- a/app/src/main/res/values-iw/strings.xml
+++ b/app/src/main/res/values-iw/strings.xml
@@ -96,6 +96,7 @@
ייבוא אירועים
+ Export events
Import events from an .ics file
האירועים יובאו בהצלחה
Importing events failed
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index f465842e2..ab8dc2846 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -96,6 +96,7 @@
Import events
+ Export events
Import events from an .ics file
Events imported successfully
Importing events failed
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 11cc95bd1..8f647a296 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -96,6 +96,7 @@
Importar eventos
+ Export events
Importar eventos de um arquivo .ics
Eventos importados com sucesso
Falha de importação
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 556703757..41af740d7 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -96,6 +96,7 @@
Importar eventos
+ Export events
Importar eventos de um ficheiro .ics
Eventos importados com sucesso
Falha de importação
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index fee61b3af..f7173b8ff 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -96,6 +96,7 @@
Импорт событий
+ Export events
Импорт событий из .ics файла
События успешно импортированы
Импорт событий не удался
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index ec6af4b68..f5639433a 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -103,6 +103,7 @@
Importovať udalosti
+ Exportovať udalosti
Importovať udalosti z .ics súboru
Udalosti boli úspešne importované
Importovanie udalostí zlyhalo
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 226a3491e..d1cdb05cc 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -96,6 +96,7 @@
Import events
+ Export events
Import events from an .ics file
Events imported successfully
Importing events failed
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 087e64d79..f845fde97 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -96,6 +96,7 @@
Import events
+ Export events
Import events from an .ics file
Events imported successfully
Importing events failed