[Android] Do not hardcode strings

Jean-Baptiste Kempf git at videolan.org
Sun Apr 15 20:54:37 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 15 20:54:19 2012 +0200| [73f8119e0ee086dc5b811160e0a217fab94a7cf3] | committer: Jean-Baptiste Kempf

Do not hardcode strings

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

 vlc-android/res/values/strings.xml                 |    3 +++
 .../src/org/videolan/vlc/gui/MainActivity.java     |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 48083cc..7046ba7 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -81,4 +81,7 @@
     <string name="track_text_info">Codec: %1$s\nLanguage: %2$s</string>
     <string name="track_unknown">Unknown track</string>
     <string name="open_mrl">Open MRL</string>
+    <string name="open_mrl_dialog_title">Open network stream</string>
+    <string name="open_mrl_dialog_msg">Enter network MRL: e.g. http://, mms:// or rtsp://</string>
+
 </resources>
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index c4a1803..7f7c791 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -240,8 +240,8 @@ public class MainActivity extends TabActivity {
             case R.id.ml_menu_open_mrl:
                 AlertDialog.Builder b = new AlertDialog.Builder(this);
                 final EditText input = new EditText(this);
-                b.setTitle("Open Network stream");
-                b.setMessage("Enter network MRL: e.g. http://, mms:// or rtsp://");
+                b.setTitle(R.string.open_mrl_dialog_title);
+                b.setMessage(R.string.open_mrl_dialog_msg);
                 b.setView(input);
                 b.setPositiveButton("Open", new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialog, int button) {



More information about the Android mailing list