[Android] Set SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION in the video player
Martin Storsjö
git at videolan.org
Tue Apr 16 15:03:24 CEST 2013
vlc-ports/android | branch: master | Martin Storsjö <martin at martin.st> | Tue Apr 16 15:51:09 2013 +0300| [a8822b341483da26338926058831c2076e2377cd] | committer: Martin Storsjö
Set SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION in the video player
This makes sure the video surface is laid out as if the navigation
bar is hidden, even if it isn't hidden yet. This avoids resizing
the video surface whenever the navigation bar is hidden/shown.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a8822b341483da26338926058831c2076e2377cd
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index a6cbec0..146cc62 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1267,10 +1267,11 @@ public class VideoPlayerActivity extends Activity {
if (!Util.isHoneycombOrLater() || !Util.hasNavBar())
return;
mSurface.setSystemUiVisibility(
- dim ? (Util.hasCombBar()
+ (dim ? (Util.hasCombBar()
? View.SYSTEM_UI_FLAG_LOW_PROFILE
: View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)
- : View.SYSTEM_UI_FLAG_VISIBLE);
+ : View.SYSTEM_UI_FLAG_VISIBLE) |
+ (Util.hasCombBar() ? 0 : View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION));
}
private void updateOverlayPausePlay() {
More information about the Android
mailing list