[Android] Video Player: fix lint warning for ActionBar
Thomas Guillem
git at videolan.org
Thu Oct 2 12:11:56 CEST 2014
vlc-ports/android | branch: master | Thomas Guillem <thomas.guillem at gmail.com> | Thu Oct 2 12:02:56 2014 +0200| [b759c2525566f1d7a5027be912ff9ac6956c6800] | committer: Jean-Baptiste Kempf
Video Player: fix lint warning for ActionBar
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b759c2525566f1d7a5027be912ff9ac6956c6800
---
.../org/videolan/vlc/gui/video/VideoPlayerActivity.java | 12 ++++++++++--
1 file changed, 10 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 057412f..76df4ab 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1737,6 +1737,14 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
showOverlay(OVERLAY_TIMEOUT);
}
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+ private void setActionBarVisibility(boolean show) {
+ if (show)
+ mActionBar.show();
+ else
+ mActionBar.hide();
+ }
+
/**
* show overlay
*/
@@ -1748,7 +1756,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
mShowing = true;
if (!mIsLocked) {
if (mOverlayUseStatusBar)
- mActionBar.show();
+ setActionBarVisibility(true);
else
mOverlayHeader.setVisibility(View.VISIBLE);
mOverlayOption.setVisibility(View.VISIBLE);
@@ -1789,7 +1797,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
mOverlayBackground.setVisibility(View.INVISIBLE);
}
if (mOverlayUseStatusBar)
- mActionBar.hide();
+ setActionBarVisibility(false);
else
mOverlayHeader.setVisibility(View.INVISIBLE);
mOverlayOption.setVisibility(View.INVISIBLE);
More information about the Android
mailing list