add a Save as button to the editor

This commit is contained in:
tibbi 2016-11-06 21:52:43 +01:00
parent a31533418d
commit 90d704cff4
9 changed files with 23 additions and 4 deletions

View file

@ -52,17 +52,25 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
} }
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) { return when (item.itemId) {
R.id.save -> { R.id.save -> {
crop_image_view.getCroppedImageAsync() crop_image_view.getCroppedImageAsync()
return true true
} }
R.id.rotate -> { R.id.rotate -> {
crop_image_view.rotateImage(90) 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) { override fun onCropImageComplete(view: CropImageView, result: CropImageView.CropResult) {

View file

@ -11,4 +11,8 @@
android:icon="@mipmap/check" android:icon="@mipmap/check"
android:title="@string/save" android:title="@string/save"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item
android:id="@+id/save_as"
android:title="@string/save_as"
app:showAsAction="never"/>
</menu> </menu>

View file

@ -37,6 +37,7 @@
<string name="hidden">(versteckt)</string> <string name="hidden">(versteckt)</string>
<string name="confirm_storage_access_title">Confirm external storage access</string> <string name="confirm_storage_access_title">Confirm external storage access</string>
<string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string> <string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string>
<string name="save_as">Save as</string>
<plurals name="folders_deleted"> <plurals name="folders_deleted">
<item quantity="one">1 Ordner gelöscht</item> <item quantity="one">1 Ordner gelöscht</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</string> <string name="hidden">(hidden)</string>
<string name="confirm_storage_access_title">Confirm external storage access</string> <string name="confirm_storage_access_title">Confirm external storage access</string>
<string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string> <string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string>
<string name="save_as">Save as</string>
<plurals name="folders_deleted"> <plurals name="folders_deleted">
<item quantity="one">1 carpeta eliminada</item> <item quantity="one">1 carpeta eliminada</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</string> <string name="hidden">(hidden)</string>
<string name="confirm_storage_access_title">Confirm external storage access</string> <string name="confirm_storage_access_title">Confirm external storage access</string>
<string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string> <string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string>
<string name="save_as">Save as</string>
<plurals name="folders_deleted"> <plurals name="folders_deleted">
<item quantity="one">1 cartella eliminata</item> <item quantity="one">1 cartella eliminata</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</string> <string name="hidden">(hidden)</string>
<string name="confirm_storage_access_title">Confirm external storage access</string> <string name="confirm_storage_access_title">Confirm external storage access</string>
<string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string> <string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string>
<string name="save_as">Save as</string>
<plurals name="folders_deleted"> <plurals name="folders_deleted">
<item quantity="one">1 フォルダーを削除しました</item> <item quantity="one">1 フォルダーを削除しました</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</string> <string name="hidden">(hidden)</string>
<string name="confirm_storage_access_title">Confirm external storage access</string> <string name="confirm_storage_access_title">Confirm external storage access</string>
<string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string> <string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string>
<string name="save_as">Save as</string>
<plurals name="folders_deleted"> <plurals name="folders_deleted">
<item quantity="one">1 pasta eliminada</item> <item quantity="one">1 pasta eliminada</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</string> <string name="hidden">(hidden)</string>
<string name="confirm_storage_access_title">Confirm external storage access</string> <string name="confirm_storage_access_title">Confirm external storage access</string>
<string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string> <string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string>
<string name="save_as">Save as</string>
<plurals name="folders_deleted"> <plurals name="folders_deleted">
<item quantity="one">1 mapp borttagen</item> <item quantity="one">1 mapp borttagen</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</string> <string name="hidden">(hidden)</string>
<string name="confirm_storage_access_title">Confirm external storage access</string> <string name="confirm_storage_access_title">Confirm external storage access</string>
<string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string> <string name="confirm_storage_access_text">Please choose the root folder of the SD card to grant write access on the next screen</string>
<string name="save_as">Save as</string>
<plurals name="folders_deleted"> <plurals name="folders_deleted">
<item quantity="one">1 folder deleted</item> <item quantity="one">1 folder deleted</item>