[Android] Extract Strings to resources

Geoffrey Métais git at videolan.org
Wed Feb 3 16:39:52 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb  3 16:39:29 2016 +0100| [2a54e65fe8b0bb17737bb07c5ce42411f26ede7f] | committer: Geoffrey Métais

Extract Strings to resources

> https://code.videolan.org/videolan/vlc-android/commit/2a54e65fe8b0bb17737bb07c5ce42411f26ede7f
---

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

diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 4e9c100..6b56887 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -588,6 +588,8 @@
         <item>YV12</item>
     </string-array>
     <string name="chroma_format_default" translatable="false">RV32</string>
+    <string name="network_favorites">Network favorites</string>
+    <string name="network_shared_folders">Shared folders</string>
 
     <string-array name="chroma_formats" translatable="false">
         <item>RGB 32-bit</item>
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
index 0c0a19a..f57eebf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
@@ -136,11 +136,11 @@ public class NetworkBrowserFragment extends BaseBrowserFragment implements View.
             mAdapter.removeItem(0, mReadyToDisplay); //also remove separator if no more fav
         } else {
             if (mFavorites == 0)
-                mAdapter.addItem("Network favorites", false, false,0); //add header if needed
+                mAdapter.addItem(getString(R.string.network_favorites), false, false,0); //add header if needed
             for (int i = 0 ; i < newSize ; ++i)
                 mAdapter.addItem(favs.get(i), false, false, i+1); //add new favorites
             if (mFavorites == 0)
-                mAdapter.addItem("Shared folders", false, false, newSize + 1); //add header if needed
+                mAdapter.addItem(getString(R.string.network_shared_folders), false, false, newSize + 1); //add header if needed
             mAdapter.setTop(newSize + 2);
             mAdapter.notifyItemRangeChanged(0, newSize + 1);
         }



More information about the Android mailing list