Bug: b/307278302
Fix clipping of DesktopTaskView border on focus/ hover
Hover border: https://screenshot.googleplex.com/B9CUW49q6inMW75
Focus border: https://screenshot.googleplex.com/36uLJ4jC295t7PZ
`android:clipToOutline` prevents drawing outside view bounds and results in the focus/ hover border getting clipped, instead we can use `android:clipToPadding` with a small non-zero padding to clip children and allow drawing a border outside the bounds
Change-Id: I7e763f7ee8c7fd1090c7778c2c000d2b792bef06
diff --git a/quickstep/res/layout/task_desktop.xml b/quickstep/res/layout/task_desktop.xml
index fe12bd3..60827cd 100644
--- a/quickstep/res/layout/task_desktop.xml
+++ b/quickstep/res/layout/task_desktop.xml
@@ -22,12 +22,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="true"
- android:clipToOutline="true"
android:defaultFocusHighlightEnabled="false"
android:focusable="true"
launcher:focusBorderColor="?androidprv:attr/materialColorOutline"
- launcher:hoverBorderColor="?androidprv:attr/materialColorPrimary">
-
+ launcher:hoverBorderColor="?androidprv:attr/materialColorPrimary"
+ android:clipToPadding="true"
+ android:padding="0.1dp">
+ <!-- Setting a padding of 0.1 dp since android:clipToPadding needs a non-zero value for
+ padding to work-->
<View
android:id="@+id/background"
android:layout_width="match_parent"