[Android] NavBar : Re-organize show and hide process

Alexandre Perraud git at videolan.org
Wed Nov 14 12:28:50 CET 2012


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Tue Nov 13 16:10:03 2012 +0100| [1288d9a9a0252e3eaf5e5666502c693a7ff08419] | committer: Jean-Baptiste Kempf

NavBar : Re-organize show and hide process

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=1288d9a9a0252e3eaf5e5666502c693a7ff08419
---

 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java  |   14 ++------------
 1 file changed, 2 insertions(+), 12 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 760185a..629718d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -115,7 +115,6 @@ public class VideoPlayerActivity extends Activity {
     private static final int SHOW_PROGRESS = 2;
     private static final int SURFACE_SIZE = 3;
     private static final int FADE_OUT_INFO = 4;
-    private static final int HIDE_NAV = 5;
     private boolean mDragging;
     private boolean mShowing;
     private int mUiVisibility = -1;
@@ -187,7 +186,6 @@ public class VideoPlayerActivity extends Activity {
                             setSurfaceSize(mVideoWidth, mVideoHeight, mSarNum, mSarDen);
                             if (visibility == View.SYSTEM_UI_FLAG_VISIBLE && !mShowing) {
                                 showOverlay();
-                                mHandler.sendMessageDelayed(mHandler.obtainMessage(HIDE_NAV), OVERLAY_TIMEOUT);
                             }
                             mUiVisibility = visibility;
                         }
@@ -284,7 +282,7 @@ public class VideoPlayerActivity extends Activity {
     @Override
     protected void onStart() {
         super.onStart();
-        dimStatusBar(true);
+        showOverlay();
         mSwitchingView = false;
     }
 
@@ -612,9 +610,6 @@ public class VideoPlayerActivity extends Activity {
                 case FADE_OUT_INFO:
                     activity.fadeOutInfo();
                     break;
-                case HIDE_NAV:
-                    activity.dimStatusBar(true);
-                    break;
             }
         }
     };
@@ -770,10 +765,6 @@ public class VideoPlayerActivity extends Activity {
                     showOverlay();
                 } else {
                     hideOverlay(true);
-                    if (Util.isICSOrLater())
-                        mHandler.sendMessageDelayed(
-                                mHandler.obtainMessage(HIDE_NAV),
-                                OVERLAY_TIMEOUT);
                 }
             }
             // Seek
@@ -1097,7 +1088,6 @@ public class VideoPlayerActivity extends Activity {
      * show overlay
      */
     private void showOverlay(int timeout) {
-        mHandler.removeMessages(HIDE_NAV);
         mHandler.sendEmptyMessage(SHOW_PROGRESS);
         if (!mShowing) {
             mShowing = true;
@@ -1135,8 +1125,8 @@ public class VideoPlayerActivity extends Activity {
             mOverlayHeader.setVisibility(View.INVISIBLE);
             mOverlayOption.setVisibility(View.INVISIBLE);
             mOverlay.setVisibility(View.INVISIBLE);
-            dimStatusBar(true);
             mShowing = false;
+            dimStatusBar(true);
         }
     }
 



More information about the Android mailing list