[Android] Secondary Display : Turn the background remote screen off

Alexandre Perraud git at videolan.org
Thu Apr 10 17:20:11 CEST 2014


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Thu Apr 10 16:27:21 2014 +0200| [8c6fb4c281f999993314d796f91106bc239112ad] | committer: Jean-Baptiste Kempf

Secondary Display : Turn the background remote screen off

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

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

 vlc-android/res/layout-land/player_remote_control.xml           |    2 +-
 vlc-android/res/layout/player_remote_control.xml                |    3 +--
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java     |    7 +++++++
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/vlc-android/res/layout-land/player_remote_control.xml b/vlc-android/res/layout-land/player_remote_control.xml
index 62b2865..797893c 100644
--- a/vlc-android/res/layout-land/player_remote_control.xml
+++ b/vlc-android/res/layout-land/player_remote_control.xml
@@ -34,6 +34,7 @@
     </FrameLayout>
 
     <RelativeLayout
+        android:id="@+id/player_overlay_background"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@color/background_remote"
@@ -111,7 +112,6 @@
             android:layout_height="wrap_content"
             android:layout_below="@+id/player_overlay_header"
             android:layout_centerHorizontal="true"
-            android:background="@color/background_remote"
             android:padding="5dp"
             android:textColor="#ffffff"
             android:textSize="36sp"
diff --git a/vlc-android/res/layout/player_remote_control.xml b/vlc-android/res/layout/player_remote_control.xml
index 991a253..413a141 100644
--- a/vlc-android/res/layout/player_remote_control.xml
+++ b/vlc-android/res/layout/player_remote_control.xml
@@ -34,6 +34,7 @@
     </FrameLayout>
 
     <RelativeLayout
+        android:id="@+id/player_overlay_background"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@color/background_remote"
@@ -87,14 +88,12 @@
             android:layout_height="wrap_content"
             android:layout_below="@+id/player_overlay_header"
             android:layout_centerHorizontal="true"
-            android:background="@color/background_remote"
             android:padding="5dp"
             android:textColor="#ffffff"
             android:textSize="36sp"
             android:visibility="invisible" />
 
         <ImageView
-            android:id="@+id/player_overlay_background"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentBottom="true"
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 69e9bfb..78f864d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -140,6 +140,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
     private View mOverlayHeader;
     private View mOverlayOption;
     private View mOverlayProgress;
+    private View mOverlayBackground;
     private static final int OVERLAY_TIMEOUT = 4000;
     private static final int OVERLAY_INFINITE = 3600000;
     private static final int FADE_OUT = 1;
@@ -268,6 +269,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
         mOverlayHeader = findViewById(R.id.player_overlay_header);
         mOverlayOption = findViewById(R.id.option_overlay);
         mOverlayProgress = findViewById(R.id.progress_overlay);
+        mOverlayBackground = findViewById(R.id.player_overlay_background);
 
         /* header */
         mTitle = (TextView) findViewById(R.id.player_overlay_title);
@@ -1554,6 +1556,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
                 dimStatusBar(false);
             }
             mOverlayProgress.setVisibility(View.VISIBLE);
+            if (mPresentation != null) mOverlayBackground.setVisibility(View.VISIBLE);
         }
         Message msg = mHandler.obtainMessage(FADE_OUT);
         if (timeout != 0) {
@@ -1578,6 +1581,10 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
                 mPlayPause.startAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out));
                 mMenu.startAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out));
             }
+            if (mPresentation != null) {
+                mOverlayBackground.startAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out));
+                mOverlayBackground.setVisibility(View.INVISIBLE);
+            }
             mOverlayHeader.setVisibility(View.INVISIBLE);
             mOverlayOption.setVisibility(View.INVISIBLE);
             mOverlayProgress.setVisibility(View.INVISIBLE);



More information about the Android mailing list