summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java16
-rw-r--r--core/src/main/res/values/strings.xml2
2 files changed, 11 insertions, 7 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java b/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java
index 266526d82..b14803751 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java
@@ -16,16 +16,20 @@ public abstract class ConfirmationDialog {
private static final String TAG = ConfirmationDialog.class.getSimpleName();
protected Context context;
- int titleId;
- int messageId;
+ private int titleId;
+ private String message;
- int positiveText;
- int negativeText;
+ private int positiveText;
+ private int negativeText;
public ConfirmationDialog(Context context, int titleId, int messageId) {
+ this(context, titleId, context.getString(messageId));
+ }
+
+ public ConfirmationDialog(Context context, int titleId, String message) {
this.context = context;
this.titleId = titleId;
- this.messageId = messageId;
+ this.message = message;
}
public void onCancelButtonPressed(DialogInterface dialog) {
@@ -47,7 +51,7 @@ public abstract class ConfirmationDialog {
public final AlertDialog createNewDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(titleId);
- builder.setMessage(messageId);
+ builder.setMessage(message);
builder.setPositiveButton(positiveText != 0 ? positiveText : R.string.confirm_label,
(dialog, which) -> onConfirmButtonPressed(dialog));
builder.setNegativeButton(negativeText != 0 ? negativeText : R.string.cancel_label,
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index ebddeb243..d9b474de6 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -124,7 +124,7 @@
<string name="share_feed_url_label">Share Feed URL</string>
<string name="share_item_url_label">Share Episode File URL</string>
<string name="share_item_url_with_position_label">Share Episode File URL with Position</string>
- <string name="feed_delete_confirmation_msg">Please confirm that you want to delete this feed and ALL episodes of this feed that you have downloaded.</string>
+ <string name="feed_delete_confirmation_msg">Please confirm that you want to delete the feed \"%1$s\" and ALL episodes of this feed that you have downloaded.</string>
<string name="feed_remover_msg">Removing Feed</string>
<string name="load_complete_feed">Refresh complete Feed</string>
<string name="hide_episodes_title">Hide Episodes</string>