diff options
author | Thomas Knepper <thknepper@gmx.de> | 2014-04-05 15:52:00 +0200 |
---|---|---|
committer | Thomas Knepper <thknepper@gmx.de> | 2014-04-05 15:52:00 +0200 |
commit | 45979d1fe67a75cf215060bacf57bd68411ab30f (patch) | |
tree | 10d5ed2f588a4119ebd09fba5db230c4b4c69d7f /src/github/daneren2005 | |
parent | e2c0547795499cd29ae3dd0d850e4a521d72496f (diff) | |
download | dsub-45979d1fe67a75cf215060bacf57bd68411ab30f.tar.gz dsub-45979d1fe67a75cf215060bacf57bd68411ab30f.tar.bz2 dsub-45979d1fe67a75cf215060bacf57bd68411ab30f.zip |
Use resource string instead of hard code
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/activity/SettingsActivity.java | 2 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/util/Util.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/activity/SettingsActivity.java b/src/github/daneren2005/dsub/activity/SettingsActivity.java index f3d564a1..bf72f9a9 100644 --- a/src/github/daneren2005/dsub/activity/SettingsActivity.java +++ b/src/github/daneren2005/dsub/activity/SettingsActivity.java @@ -132,7 +132,7 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer findPreference("clearCache").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { - Util.confirmDialog(SettingsActivity.this, R.string.common_delete, "cache", new DialogInterface.OnClickListener() { + Util.confirmDialog(SettingsActivity.this, R.string.common_delete, R.string.common_confirm_message_cache, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { new LoadingTask<Void>(SettingsActivity.this, false) { diff --git a/src/github/daneren2005/dsub/util/Util.java b/src/github/daneren2005/dsub/util/Util.java index a18cc975..8488420e 100644 --- a/src/github/daneren2005/dsub/util/Util.java +++ b/src/github/daneren2005/dsub/util/Util.java @@ -651,6 +651,9 @@ public final class Util { toast.show(); } + public static void confirmDialog(Context context, int action, int subject, DialogInterface.OnClickListener onClick) { + Util.confirmDialog(context, context.getResources().getString(action).toLowerCase(), context.getResources().getString(subject), onClick); + } public static void confirmDialog(Context context, int action, String subject, DialogInterface.OnClickListener onClick) { Util.confirmDialog(context, context.getResources().getString(action).toLowerCase(), subject, onClick); } |