[Android] Only show title on video playback start

Geoffrey Métais git at videolan.org
Thu Mar 24 15:10:00 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 24 15:09:25 2016 +0100| [d0b791eec388e8e368db919d3795b8b7970f26a2] | committer: Geoffrey Métais

Only show title on video playback start

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

 vlc-android/res/layout/player_hud.xml              |  3 ++-
 .../vlc/gui/video/VideoPlayerActivity.java         | 23 +++-------------------
 2 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/vlc-android/res/layout/player_hud.xml b/vlc-android/res/layout/player_hud.xml
index 954afaf..179802a 100644
--- a/vlc-android/res/layout/player_hud.xml
+++ b/vlc-android/res/layout/player_hud.xml
@@ -9,7 +9,8 @@
     android:paddingBottom="@dimen/overlay_padding_bottom"
     android:layout_marginBottom="@dimen/overlay_margin"
     android:layout_marginRight="@dimen/overlay_margin"
-    android:layout_marginLeft="@dimen/overlay_margin">
+    android:layout_marginLeft="@dimen/overlay_margin"
+    android:visibility="invisible" >
 
     <SeekBar
         android:id="@+id/player_overlay_seekbar"
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 35cfa17..190d5d9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -209,7 +209,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
     private boolean mDragging;
     private boolean mShowing;
     private DelayState mPlaybackSetting = DelayState.OFF;
-    private int mUiVisibility = -1;
     private SeekBar mSeekbar;
     private TextView mTitle;
     private TextView mSysTime;
@@ -554,6 +553,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 mPlaylistAdapter.setCurrentIndex(mService.getCurrentMediaPosition());
                 mPlaylist.setVisibility(View.GONE);
             }
+            setActionBarVisibility(true);
+            dimStatusBar(false);
         }
     }
 
@@ -758,22 +759,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             }
         });
 
-        if (AndroidUtil.isICSOrLater())
-            getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(
-                    new OnSystemUiVisibilityChangeListener() {
-                        @Override
-                        public void onSystemUiVisibilityChange(int visibility) {
-                            if (visibility == mUiVisibility)
-                                return;
-                            if (visibility == View.SYSTEM_UI_FLAG_VISIBLE && !mShowing &&
-                                    !isFinishing() && mPlaylist.getVisibility() != View.VISIBLE) {
-                                showOverlay();
-                            }
-                            mUiVisibility = visibility;
-                        }
-                    }
-            );
-
         if (AndroidUtil.isHoneycombOrLater()) {
             if (mOnLayoutChangeListener == null) {
                 mOnLayoutChangeListener = new View.OnLayoutChangeListener() {
@@ -1570,7 +1555,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
     private void onPlaying() {
         stopLoading();
         updateNavStatus();
-        showOverlay(true);
+        mHandler.sendEmptyMessageDelayed(FADE_OUT, OVERLAY_TIMEOUT);
         setESTracks();
     }
 
@@ -3121,7 +3106,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
      */
     private void startLoading() {
         mIsLoading = true;
-        mOverlayProgress.setVisibility(View.INVISIBLE);
         AnimationSet anim = new AnimationSet(true);
         RotateAnimation rotate = new RotateAnimation(0f, 360f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
         rotate.setDuration(800);
@@ -3136,7 +3120,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
      */
     private void stopLoading() {
         mIsLoading = false;
-        mOverlayProgress.setVisibility(View.VISIBLE);
         mLoading.setVisibility(View.INVISIBLE);
         mLoading.clearAnimation();
         if (mPresentation != null) {



More information about the Android mailing list