[Android] Hide Network & History in release mode
Geoffrey Métais
git at videolan.org
Mon Dec 7 14:57:06 CET 2015
vlc-android | branch: 1.7.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Dec 7 14:56:35 2015 +0100| [83cc51d9b54098d25c0ff71b97684e585f2e91a9] | committer: Geoffrey Métais
Hide Network & History in release mode
> https://code.videolan.org/videolan/vlc-android/commit/83cc51d9b54098d25c0ff71b97684e585f2e91a9
---
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 62076ae..f788159 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -217,6 +217,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