From cd8518f500e7a4ddb6a32d4279aeefae35c058f4 Mon Sep 17 00:00:00 2001 From: huiyan Date: Sat, 16 Jan 2016 14:19:39 +0800 Subject: Gallery2: Fix show the wrong UI after resume when the video stop. The view background is transparent when the video stop, and then it will show the wallpaper after resume. set transparent background when the video is playing or pause, and set black background on other status(stop,end,error) Change-Id: Ib97ed6b4f716ff512e7f6f258fd8ddfbdecf5587 CRs-Fixed: 952289 --- src/com/android/gallery3d/app/MovieControllerOverlay.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/com/android') diff --git a/src/com/android/gallery3d/app/MovieControllerOverlay.java b/src/com/android/gallery3d/app/MovieControllerOverlay.java index 168cbe102..de68a4579 100644 --- a/src/com/android/gallery3d/app/MovieControllerOverlay.java +++ b/src/com/android/gallery3d/app/MovieControllerOverlay.java @@ -559,7 +559,11 @@ public class MovieControllerOverlay extends CommonControllerOverlay implements mAlwaysShowBottom = alwaysShow; if (!alwaysShow) { // clear background setBackgroundDrawable(null); - setBackgroundColor(Color.TRANSPARENT); + if (mState == State.PAUSED || mState == State.PLAYING) { + setBackgroundColor(Color.TRANSPARENT); + }else { + setBackgroundColor(Color.BLACK); + } } else { setBackgroundResource(R.drawable.media_default_bkg); if (foreShow) { @@ -875,8 +879,13 @@ public class MovieControllerOverlay extends CommonControllerOverlay implements } public void onShow() { - Log.v(TAG, "ControllerRewindAndForwardExt onShow"); + Log.v(TAG, "ControllerRewindAndForwardExt onShow: "+mState); mContollerButtons.setVisibility(View.VISIBLE); + if (mState == State.PAUSED || mState == State.PLAYING) { + setBackgroundColor(Color.TRANSPARENT); + } else { + setBackgroundColor(Color.BLACK); + } } public void onLayout(int l, int r, int b) { -- cgit v1.2.3