From 17f91d5413d53674aefb8995bdbbb41cdc0c8811 Mon Sep 17 00:00:00 2001 From: Mihai Popa Date: Tue, 10 Apr 2018 16:10:16 +0100 Subject: [PATCH] Fix ripple effect for floating toolbar menu items A corner radius was set for the floating toolbar in Ifcf4cff1f38fd18b7dbb4c1802390e3beb92cd3c. This produced a bug, where the ripple effect set on the floating toolbar menu items was expanding outside the corners when these were pressed. This CL sets the menu items container to clip to outline, such that the ripple effect of the menu items will be clipped. Bug: 77547543 Test: manual testing Change-Id: Ib43a6c719aab1403273f47e559433c9856b4f8b4 --- core/java/com/android/internal/widget/FloatingToolbar.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/com/android/internal/widget/FloatingToolbar.java b/core/java/com/android/internal/widget/FloatingToolbar.java index 35aae15a809c..2ce5a0be44e0 100644 --- a/core/java/com/android/internal/widget/FloatingToolbar.java +++ b/core/java/com/android/internal/widget/FloatingToolbar.java @@ -1706,6 +1706,7 @@ public final class FloatingToolbar { contentContainer.setLayoutParams(new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); contentContainer.setTag(FLOATING_TOOLBAR_TAG); + contentContainer.setClipToOutline(true); return contentContainer; } -- 2.11.0