[Android] Hide Network & History in release mode

Geoffrey Métais git at videolan.org
Mon Dec 7 15:09:10 CET 2015


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Dec  7 14:56:35 2015 +0100| [c0c81214b3cf5aad2b5eb43a6adbd4788bde4078] | committer: Geoffrey Métais

Hide Network & History in release mode

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

 vlc-android/res/menu/navigation.xml                    | 6 ++++--
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/vlc-android/res/menu/navigation.xml b/vlc-android/res/menu/navigation.xml
index 942f245..5a6cd5e 100644
--- a/vlc-android/res/menu/navigation.xml
+++ b/vlc-android/res/menu/navigation.xml
@@ -22,7 +22,8 @@
     <item
         android:id="@+id/nav_network"
         android:title="@string/network_browsing"
-        android:icon="@drawable/ic_menu_network" />
+        android:icon="@drawable/ic_menu_network"
+        android:visible="false" />
 
     <item
         android:id="@+id/nav_mrl"
@@ -32,7 +33,8 @@
     <item
         android:id="@+id/nav_history"
         android:title="@string/history"
-        android:icon="@drawable/ic_menu_history" />
+        android:icon="@drawable/ic_menu_history"
+        android:visible="false" />
     </group>
     <group android:id="@+id/fixed_group"
         android:checkableBehavior="single">
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index ec6ed8e..6e5beef 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -216,6 +216,11 @@ public class MainActivity extends AudioPlayerContainerActivity implements Search
             item.setTitle(R.string.open);
         }
 
+        if (BuildConfig.DEBUG) {
+            mNavigationView.getMenu().findItem(R.id.nav_history).setVisible(true);
+            mNavigationView.getMenu().findItem(R.id.nav_network).setVisible(true);
+        }
+
         if (AndroidUtil.isLolliPopOrLater())
             mNavigationView.setPadding(0, mNavigationView.getPaddingTop()/2, 0, 0);
     }



More information about the Android mailing list