diff --git a/libs/WindowManager/Shell/res/layout/tv_pip_menu.xml b/libs/WindowManager/Shell/res/layout/tv_pip_menu.xml index 8533a5994d33c..b0dab90b6add6 100644 --- a/libs/WindowManager/Shell/res/layout/tv_pip_menu.xml +++ b/libs/WindowManager/Shell/res/layout/tv_pip_menu.xml @@ -16,92 +16,98 @@ --> + android:id="@+id/tv_pip_menu" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center|top"> - + android:layout_marginEnd="@dimen/pip_menu_outer_space"> - + - + - + - + - + android:orientation="horizontal" + android:alpha="0"> - + - + - + - + - + - - + + + + + + + + + + - + #990E0E0F #E8EAED + #990E0E0F #1E232C #99D2E3FC diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java index 4d7c8465bcc23..97e017a65b04a 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipMenuView.java @@ -97,6 +97,9 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener { private final ImageView mArrowLeft; private final TvWindowMenuActionButton mA11yDoneButton; + private final View mPipBackground; + private final View mDimLayer; + private final ScrollView mScrollView; private final HorizontalScrollView mHorizontalScrollView; private View mFocusedButton; @@ -148,6 +151,9 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener { mExpandButton = findViewById(R.id.tv_pip_menu_expand_button); mExpandButton.setOnClickListener(this); + mPipBackground = findViewById(R.id.tv_pip_menu_background); + mDimLayer = findViewById(R.id.tv_pip_menu_dim_layer); + mScrollView = findViewById(R.id.tv_pip_menu_scroll); mHorizontalScrollView = findViewById(R.id.tv_pip_menu_horizontal_scroll); @@ -231,7 +237,7 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener { mCurrentPipBounds.width() / (float) mCurrentPipBounds.height(), finishBounds.width() / (float) finishBounds.height()); if (ratioChanged) { - mPipView.animate() + mPipBackground.animate() .alpha(1f) .setInterpolator(TvPipInterpolators.EXIT) .setDuration(mResizeAnimationDuration / 2) @@ -272,7 +278,7 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener { "%s: onPipTransitionFinished()", TAG); // Fade in content by fading out view on top. - mPipView.animate() + mPipBackground.animate() .alpha(0f) .setDuration(mResizeAnimationDuration / 2) .setInterpolator(TvPipInterpolators.ENTER) @@ -770,6 +776,7 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener { refocusPreviousButton(); } animateAlphaTo(show ? 1 : 0, mActionButtonsContainer); + animateAlphaTo(show ? 1 : 0, mDimLayer); } private void setFrameHighlighted(boolean highlighted) {