summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-11-26 15:45:38 -0800
committerDanesh M <daneshm90@gmail.com>2014-06-06 22:54:20 -0700
commit2a3aeaa8567480df683cedaebaa6964b9a5a1d84 (patch)
treedbe2b4ae7f3f61487beb550e7fc5aa51f4af69c6 /src
parent35dc8fece92930977f7a97091af2866958ac7d51 (diff)
downloadandroid_packages_apps_Trebuchet-2a3aeaa8567480df683cedaebaa6964b9a5a1d84.tar.gz
android_packages_apps_Trebuchet-2a3aeaa8567480df683cedaebaa6964b9a5a1d84.tar.bz2
android_packages_apps_Trebuchet-2a3aeaa8567480df683cedaebaa6964b9a5a1d84.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Workspace.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 981941e5c..8c628e72c 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -362,6 +362,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