[Android] Update menu text for media/dir mode dynamically

Edward Wang git at videolan.org
Sat Jun 23 06:13:20 CEST 2012


android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Fri Jun 22 20:02:18 2012 -0400| [39ee65006d633d28f7f68b322ef1ba7d8e7ae75c] | committer: Edward Wang

Update menu text for media/dir mode dynamically

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

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

diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 02f019c..f5ad8fd 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -92,6 +92,7 @@
     <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>
+    <string name="media_library">Media library</string>
 
     <!--  Preferences -->
     <string name="preferences">Preferences</string>
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 9435a10..c0363f1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -275,6 +275,10 @@ public class MainActivity extends SherlockFragmentActivity {
             // Browse Folders
             case R.id.ml_menu_browse:
                 showDirectoryView();
+                if(mMediaLibraryActive)
+                    item.setTitle(R.string.directories);
+                else
+                    item.setTitle(R.string.media_library);
                 break;
             // Open MRL
             case R.id.ml_menu_open_mrl:



More information about the Android mailing list