Add dim layer to PiP menu below buttons
Only show the dim when the menu buttons are shown to improve their visibility. Bug: 241744433 Test: manual - open a PiP and go to the menu. PiP content should get darker. After pressing the back button or when entering the move menu the dim should disappear. Change-Id: I67256421994931467f2bc499bad5d5785213304a
This commit is contained in:
@@ -37,6 +37,13 @@
|
||||
android:background="@color/tv_pip_menu_background"
|
||||
android:alpha="0"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/tv_pip_menu_dim_layer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/tv_pip_menu_dim_layer"
|
||||
android:alpha="0"/>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/tv_pip_menu_scroll"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<color name="tv_window_menu_icon_bg_unfocused">#990E0E0F</color>
|
||||
|
||||
<color name="tv_pip_menu_focus_border">#E8EAED</color>
|
||||
<color name="tv_pip_menu_dim_layer">#990E0E0F</color>
|
||||
<color name="tv_pip_menu_background">#1E232C</color>
|
||||
|
||||
<color name="tv_pip_edu_text">#99D2E3FC</color>
|
||||
|
||||
@@ -98,6 +98,7 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener {
|
||||
private final TvWindowMenuActionButton mA11yDoneButton;
|
||||
|
||||
private final View mPipBackground;
|
||||
private final View mDimLayer;
|
||||
|
||||
private final ScrollView mScrollView;
|
||||
private final HorizontalScrollView mHorizontalScrollView;
|
||||
@@ -151,6 +152,7 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener {
|
||||
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);
|
||||
@@ -774,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) {
|
||||
|
||||
Reference in New Issue
Block a user