summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/Launcher.java27
-rw-r--r--src/com/android/launcher3/Workspace.java4
2 files changed, 9 insertions, 22 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 943e5fec5..d4bd30169 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -553,11 +553,11 @@ public class Launcher extends Activity
}
/**
- * To be overridden by subclasses to create the custom content and call
+ * To be overridden by subclasses to populate the custom content container and call
* {@link #addToCustomContentPage}. This will only be invoked if
* {@link #hasCustomContentToLeft()} is {@code true}.
*/
- protected void addCustomContentToLeft() {
+ protected void populateCustomContentContainer() {
}
/**
@@ -587,8 +587,8 @@ public class Launcher extends Activity
if (!mWorkspace.hasCustomContent() && hasCustomContentToLeft()) {
// Create the custom content page and call the subclass to populate it.
- mWorkspace.createCustomContentPage();
- addCustomContentToLeft();
+ mWorkspace.createCustomContentContainer();
+ populateCustomContentContainer();
} else if (mWorkspace.hasCustomContent() && !hasCustomContentToLeft()) {
mWorkspace.removeCustomContentPage();
}
@@ -1089,12 +1089,6 @@ public class Launcher extends Activity
((SlidingUpPanelLayout) mOverviewPanel).collapsePane();
}
- protected void onFinishBindingItems() {
- if (mWorkspace != null && hasCustomContentToLeft() && mWorkspace.hasCustomContent()) {
- addCustomContentToLeft();
- }
- }
-
QSBScroller mQsbScroller = new QSBScroller() {
int scrollY = 0;
@@ -3956,9 +3950,9 @@ public class Launcher extends Activity
// Create the custom content page (this call updates mDefaultScreen which calls
// setCurrentPage() so ensure that all pages are added before calling this).
- // The actual content of the custom page will be added during onFinishBindingItems().
- if (!mWorkspace.hasCustomContent() && hasCustomContentToLeft()) {
- mWorkspace.createCustomContentPage();
+ if (hasCustomContentToLeft()) {
+ mWorkspace.createCustomContentContainer();
+ populateCustomContentContainer();
}
}
@@ -4240,13 +4234,6 @@ public class Launcher extends Activity
mWorkspace.getUniqueComponents(true, null);
mIntentsOnWorkspaceFromUpgradePath = mWorkspace.getUniqueComponents(true, null);
}
-
- mWorkspace.post(new Runnable() {
- @Override
- public void run() {
- onFinishBindingItems();
- }
- });
}
private boolean canRunNewAppsAnimation() {
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 72fd9edbc..d2586e764 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -453,7 +453,7 @@ public class Workspace extends SmoothPagedView
setClipChildren(false);
setClipToPadding(false);
setChildrenDrawnWithCacheEnabled(true);
-
+
setMinScale(mOverviewModeShrinkFactor);
setupLayoutTransition();
@@ -606,7 +606,7 @@ public class Workspace extends SmoothPagedView
return screenId;
}
- public void createCustomContentPage() {
+ public void createCustomContentContainer() {
CellLayout customScreen = (CellLayout)
mLauncher.getLayoutInflater().inflate(R.layout.workspace_screen, null);
customScreen.disableBackground();