diff options
author | ByteHamster <info@bytehamster.com> | 2017-04-15 10:28:29 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2017-04-15 10:28:45 +0200 |
commit | cb3501342e2a8d3fb32c12c40f60d3006fbb17dc (patch) | |
tree | 295b2701539ff05bcbfe6e077db2b86244fcb623 /core/src | |
parent | 639ff81f8c4d8d4648fe4a52bd1c7d05b439d7e2 (diff) | |
download | AntennaPod-cb3501342e2a8d3fb32c12c40f60d3006fbb17dc.zip |
Added feed title to delete confirmation
Closes #2291
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java | 16 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 2 |
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> |