summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout/workspace_custom_content.xml33
-rw-r--r--src/com/android/launcher3/Workspace.java6
2 files changed, 5 insertions, 34 deletions
diff --git a/res/layout/workspace_custom_content.xml b/res/layout/workspace_custom_content.xml
deleted file mode 100644
index 649768515..000000000
--- a/res/layout/workspace_custom_content.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<com.android.launcher3.CellLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
-
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingStart="0dp"
- android:paddingEnd="0dp"
- android:paddingTop="0dp"
- android:paddingBottom="0dp"
- android:hapticFeedbackEnabled="false"
-
- launcher:cellWidth="@dimen/workspace_cell_width"
- launcher:cellHeight="@dimen/workspace_cell_height"
- launcher:widthGap="@dimen/workspace_width_gap"
- launcher:heightGap="@dimen/workspace_height_gap"
- launcher:maxGap="@dimen/workspace_max_gap" />
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);