Fix TV PiP custom action style

Bug: 269156537
Test: manual - open PiP with custom close action -> close button should
be red (darker when not focused).

Change-Id: I4ae7f7b0b13446d29572fa93faffd575c23e8364
(cherry picked from commit 2f27e357b0)
This commit is contained in:
Jacqueline Bronger
2023-02-13 22:29:14 +01:00
parent 8b0a18473b
commit bee1003618
4 changed files with 5 additions and 1 deletions

View File

@@ -17,5 +17,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/tv_window_menu_button_radius" />
<solid android:color="@color/tv_window_menu_icon_bg" />
<solid android:color="@android:color/white" />
</shape>

View File

@@ -70,6 +70,8 @@ public class TvWindowMenuActionButton extends RelativeLayout {
setTextAndDescription(textResId);
}
typedArray.recycle();
setIsCustomCloseAction(false);
}
/**

View File

@@ -60,6 +60,7 @@ public class TvPipCustomAction extends TvPipAction {
}
button.setImageIconAsync(mRemoteAction.getIcon(), mainHandler);
button.setEnabled(isCloseAction() || mRemoteAction.isEnabled());
button.setIsCustomCloseAction(isCloseAction());
}
PendingIntent getPendingIntent() {

View File

@@ -61,6 +61,7 @@ public class TvPipSystemAction extends TvPipAction {
button.setTextAndDescription(mTitleResource);
button.setImageResource(mIconResource);
button.setEnabled(true);
button.setIsCustomCloseAction(false);
}
PendingIntent getPendingIntent() {