From a6b4e1bc43a6cf039e4f1b5c73a002e9e247b31e Mon Sep 17 00:00:00 2001 From: Sanatt Abrol Date: Thu, 16 Nov 2023 16:36:30 +0000 Subject: [PATCH] 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 --- quickstep/res/layout/task_desktop.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quickstep/res/layout/task_desktop.xml b/quickstep/res/layout/task_desktop.xml index fe12bd3ea7..60827cddac 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"> +