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 {
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) {

View file

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

View file

@ -37,6 +37,7 @@
<string name="hidden">(versteckt)</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="save_as">Save as</string>
<plurals name="folders_deleted">
<item quantity="one">1 Ordner gelöscht</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</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="save_as">Save as</string>
<plurals name="folders_deleted">
<item quantity="one">1 carpeta eliminada</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</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="save_as">Save as</string>
<plurals name="folders_deleted">
<item quantity="one">1 cartella eliminata</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</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="save_as">Save as</string>
<plurals name="folders_deleted">
<item quantity="one">1 フォルダーを削除しました</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</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="save_as">Save as</string>
<plurals name="folders_deleted">
<item quantity="one">1 pasta eliminada</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</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="save_as">Save as</string>
<plurals name="folders_deleted">
<item quantity="one">1 mapp borttagen</item>

View file

@ -37,6 +37,7 @@
<string name="hidden">(hidden)</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="save_as">Save as</string>
<plurals name="folders_deleted">
<item quantity="one">1 folder deleted</item>