diff --git a/app/src/main/java/com/simplemobiletools/notes/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/notes/activities/MainActivity.java
index c431e2de..ed54fddc 100644
--- a/app/src/main/java/com/simplemobiletools/notes/activities/MainActivity.java
+++ b/app/src/main/java/com/simplemobiletools/notes/activities/MainActivity.java
@@ -1,6 +1,7 @@
package com.simplemobiletools.notes.activities;
import android.content.Context;
+import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
@@ -78,7 +79,7 @@ public class MainActivity extends SimpleActivity {
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.delete_note:
- deleteNote();
+ displayDeleteNotePrompt();
return true;
case R.id.open_note:
displayOpenNoteDialog();
@@ -127,6 +128,21 @@ public class MainActivity extends SimpleActivity {
});
}
+ private void displayDeleteNotePrompt() {
+ final Resources res = getResources();
+ final AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle(res.getString(R.string.delete_note_prompt_title));
+ builder.setMessage(String.format(res.getString(R.string.delete_note_prompt_message), mCurrentNote.getTitle()));
+ builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ deleteNote();
+ }
+ });
+ builder.setNegativeButton(R.string.cancel, null);
+ builder.show();
+ }
+
private void deleteNote() {
}
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 11176cec..fcda9f17 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -15,6 +15,8 @@
A note with that title already exists
Open note
Delete note
+ Delete note
+ Are you sure you want to delete note \"%1$s\"?
Einstellungen
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index a8283a03..40355869 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -15,6 +15,8 @@
A note with that title already exists
Open note
Delete note
+ Delete note
+ Are you sure you want to delete note \"%1$s\"?
Impostazioni
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 10d9e04c..fc832090 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -15,6 +15,8 @@
A note with that title already exists
Open note
Delete note
+ Delete note
+ Are you sure you want to delete note \"%1$s\"?
設定
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index d70bc910..8daf4368 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -15,6 +15,8 @@
A note with that title already exists
Open note
Delete note
+ Delete note
+ Are you sure you want to delete note \"%1$s\"?
Inställningar
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index bae462f1..11e72404 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -15,6 +15,8 @@
A note with that title already exists
Open note
Delete note
+ Delete note
+ Are you sure you want to delete note \"%1$s\"?
Settings