From 41eb470ef9c319b28ed4f5eb3b55dc525eff4750 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Thu, 27 Jun 2013 15:08:59 -0700 Subject: [PATCH] Fix now showing on screen 1 Change-Id: I83c3aa0b219e62af8c024229fe00933bcedbf9df --- res/layout/workspace_custom_content.xml | 33 ------------------------ src/com/android/launcher3/Workspace.java | 6 ++++- 2 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 res/layout/workspace_custom_content.xml diff --git a/res/layout/workspace_custom_content.xml b/res/layout/workspace_custom_content.xml deleted file mode 100644 index 649768515b..0000000000 --- a/res/layout/workspace_custom_content.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 88c8e2a5ca..57b0ca0cbc 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -513,7 +513,7 @@ public class Workspace extends SmoothPagedView public void addCustomContentToLeft(View customContent) { CellLayout customScreen = (CellLayout) - mLauncher.getLayoutInflater().inflate(R.layout.workspace_custom_content, null); + mLauncher.getLayoutInflater().inflate(R.layout.workspace_screen, null); int spanX = customScreen.getCountX(); int spanY = customScreen.getCountY(); @@ -523,6 +523,10 @@ public class Workspace extends SmoothPagedView customScreen.addViewToCellLayout(customContent, 0, 0, lp, true); + Rect p = new Rect(); + AppWidgetHostView.getDefaultPaddingForWidget(mLauncher, mLauncher.getComponentName(), p); + customContent.setPadding(p.left, p.top, p.right, p.bottom); + addView(customScreen, 0); mWorkspaceScreens.put(CUSTOM_CONTENT_SCREEN_ID, customScreen);