From 90d704cff4df260c50e707515de51a1a14362f99 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 6 Nov 2016 21:52:43 +0100 Subject: [PATCH] add a Save as button to the editor --- .../gallery/activities/EditActivity.kt | 16 ++++++++++++---- app/src/main/res/menu/menu_editor.xml | 4 ++++ app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 1 + app/src/main/res/values-pt-rPT/strings.xml | 1 + app/src/main/res/values-sv/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 9 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt index 59adc6755..977951374 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -52,17 +52,25 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } override fun onOptionsItemSelected(item: MenuItem): Boolean { - when (item.itemId) { + return when (item.itemId) { R.id.save -> { crop_image_view.getCroppedImageAsync() - return true + true } R.id.rotate -> { crop_image_view.rotateImage(90) - return true + true } + R.id.save_as -> { + saveAs() + true + } + else -> super.onOptionsItemSelected(item) } - return super.onOptionsItemSelected(item) + } + + private fun saveAs() { + } override fun onCropImageComplete(view: CropImageView, result: CropImageView.CropResult) { diff --git a/app/src/main/res/menu/menu_editor.xml b/app/src/main/res/menu/menu_editor.xml index d1ffb1215..5d417c0ef 100644 --- a/app/src/main/res/menu/menu_editor.xml +++ b/app/src/main/res/menu/menu_editor.xml @@ -11,4 +11,8 @@ android:icon="@mipmap/check" android:title="@string/save" app:showAsAction="ifRoom"/> + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 9d11839f2..13e665cea 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -37,6 +37,7 @@ (versteckt) Confirm external storage access Please choose the root folder of the SD card to grant write access on the next screen + Save as 1 Ordner gelöscht diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 61ae6118e..9f31fdb64 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -37,6 +37,7 @@ (hidden) Confirm external storage access Please choose the root folder of the SD card to grant write access on the next screen + Save as 1 carpeta eliminada diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index c56376f82..c2da02165 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -37,6 +37,7 @@ (hidden) Confirm external storage access Please choose the root folder of the SD card to grant write access on the next screen + Save as 1 cartella eliminata diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index a16a6225d..5a2778c19 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -37,6 +37,7 @@ (hidden) Confirm external storage access Please choose the root folder of the SD card to grant write access on the next screen + Save as 1 フォルダーを削除しました diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 3f9a06132..1aa782bbe 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -37,6 +37,7 @@ (hidden) Confirm external storage access Please choose the root folder of the SD card to grant write access on the next screen + Save as 1 pasta eliminada diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index caf78ea4b..764fa21b0 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -37,6 +37,7 @@ (hidden) Confirm external storage access Please choose the root folder of the SD card to grant write access on the next screen + Save as 1 mapp borttagen diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c9734a317..9ee0e69e9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -37,6 +37,7 @@ (hidden) Confirm external storage access Please choose the root folder of the SD card to grant write access on the next screen + Save as 1 folder deleted