[Android] Don't hardcode Media database cleared in PreferencesActivity

Edward Wang git at videolan.org
Fri Jul 6 12:58:18 CEST 2012


android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Fri Jul  6 06:58:08 2012 -0400| [1e5fb0a40f80b064d3a074ba16f33df0178e6e5a] | committer: Edward Wang

Don't hardcode Media database cleared in PreferencesActivity

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=1e5fb0a40f80b064d3a074ba16f33df0178e6e5a
---

 vlc-android/res/values/strings.xml                            |    1 +
 vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index ce05418..a9ea303 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -114,6 +114,7 @@
     <string name="advanced_debugging">Advanced debugging</string>
     <string name="quit">Quit application</string>
     <string name="clear_media_db">Clear media database</string>
+    <string name="media_db_cleared">Media database cleared!</string>
     <string name="detect_headset">Detect headset</string>
     <string name="detect_headset_detail">Pause on headset removed; resume on headset inserted</string>
     <string name="enable_wheel_bar">Enable wheel bar</string>
diff --git a/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java b/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
index 9e22d82..fa1fb5d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
@@ -166,7 +166,7 @@ public class PreferencesActivity extends PreferenceActivity {
                     @Override
                     public boolean onPreferenceClick(Preference preference) {
                         DatabaseManager.getInstance(getBaseContext()).emptyDatabase();
-                        Toast.makeText(getBaseContext(), "Media database cleared!", Toast.LENGTH_SHORT).show();
+                        Toast.makeText(getBaseContext(), R.string.media_db_cleared, Toast.LENGTH_SHORT).show();
                         return true;
                     }
                 });



More information about the Android mailing list