From 6400b84d5594d7b9244e3b118f107033eb8b87a0 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Tue, 26 Nov 2013 15:45:38 -0800 Subject: [PATCH] Update custom content insets when Workspace insets are set -> Not sure if custom content can be added before insets are set, so this is just a speculative fix. Bug: 11875171 Change-Id: Ia8e07f51f527f464262b7ff99e4db245fe5a7906 --- src/com/android/launcher3/Workspace.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 02949e7dd9..b8af9ad5b6 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -334,6 +334,14 @@ public class Workspace extends SmoothPagedView @Override public void setInsets(Rect insets) { mInsets.set(insets); + + CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID); + if (customScreen != null) { + View customContent = customScreen.getShortcutsAndWidgets().getChildAt(0); + if (customContent instanceof Insettable) { + ((Insettable) customContent).setInsets(mInsets); + } + } } // estimate the size of a widget with spans hSpan, vSpan. return MAX_VALUE for each