Making CellLayout inflatable without LauncherActivtiy

This will allow creating cellLayout with a different device profile
or a different activtiy which can be used when displaying multiple
activities in multi-display or generating a preview for changing
display properties.

Change-Id: I386731d95e33c48bdef270ce9c0d3e9feefb6262
This commit is contained in:
Sunny Goyal committed 2018-11-20 17:11:13 -08:00
1 parent 373e2534d3
commit ab770a10b9
7 files changed
+46 -55

No files matched your search

+8 -1
View File
@@ -475,6 +475,13 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
super.onViewAdded(child);
}
protected boolean onInterceptHotseatTouch(View v, MotionEvent ev) {
// We don't want any clicks to go through to the hotseat unless the workspace is in
// the normal state or an accessible drag is in progress.
return !workspaceIconsCanBeDragged()
&& !mLauncher.getAccessibilityDelegate().isInAccessibleDrag();
}
/**
* Initializes and binds the first page
* @param qsb an existing qsb to recycle or null.
@@ -2442,7 +2449,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
this.cellY = cellY;
BubbleTextView cell = (BubbleTextView) layout.getChildAt(cellX, cellY);
bg.setup(mLauncher, null, cell.getMeasuredWidth(), cell.getPaddingTop());
bg.setup(mLauncher, mLauncher, null, cell.getMeasuredWidth(), cell.getPaddingTop());
// The full preview background should appear behind the icon
bg.isClipping = false;