summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-06-27 15:08:59 -0700
committerAdam Cohen <adamcohen@google.com>2013-06-27 16:43:15 -0700
commit41eb470ef9c319b28ed4f5eb3b55dc525eff4750 (patch)
treed4eb3f36ef8faa4c9bd9a26f739f8201ab5b487d /src/com/android/launcher3/Workspace.java
parent06e6c8c50bf555e18bd62d356d4e60f3ac0d3037 (diff)
downloadandroid_packages_apps_Trebuchet-41eb470ef9c319b28ed4f5eb3b55dc525eff4750.tar.gz
android_packages_apps_Trebuchet-41eb470ef9c319b28ed4f5eb3b55dc525eff4750.tar.bz2
android_packages_apps_Trebuchet-41eb470ef9c319b28ed4f5eb3b55dc525eff4750.zip
Fix now showing on screen 1
Change-Id: I83c3aa0b219e62af8c024229fe00933bcedbf9df
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 88c8e2a5c..57b0ca0cb 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);