am 6c58d9e3: Merge "Calling removeItems() should mark the item\'s previous cell as unoccupied. (3405806)" into honeycomb
* commit '6c58d9e385dae56d68b62bc504af689f5af6b1c9': Calling removeItems() should mark the item's previous cell as unoccupied. (3405806)
This commit is contained in:
@@ -483,10 +483,6 @@ public class CellLayout extends CachedViewGroup {
|
||||
return mCountY;
|
||||
}
|
||||
|
||||
public boolean addViewToCellLayout(View child, int index, int childId, LayoutParams params) {
|
||||
return addViewToCellLayout(child, index, childId, params, true);
|
||||
}
|
||||
|
||||
public boolean addViewToCellLayout(
|
||||
View child, int index, int childId, LayoutParams params, boolean markCells) {
|
||||
final LayoutParams lp = params;
|
||||
|
||||
@@ -167,4 +167,5 @@ public class CellLayoutChildren extends ViewGroup {
|
||||
protected void setChildrenDrawnWithCacheEnabled(boolean enabled) {
|
||||
super.setChildrenDrawnWithCacheEnabled(enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3333,8 +3333,8 @@ public final class Launcher extends Activity
|
||||
int count = workspace.getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
// Use removeAllViewsInLayout() to avoid an extra requestLayout() and invalidate().
|
||||
final ViewGroup layout = ((CellLayout) workspace.getChildAt(i)).getChildrenLayout();
|
||||
layout.removeAllViewsInLayout();
|
||||
final CellLayout layoutParent = (CellLayout) workspace.getChildAt(i);
|
||||
layoutParent.removeAllViewsInLayout();
|
||||
}
|
||||
|
||||
if (DEBUG_USER_INTERFACE) {
|
||||
|
||||
@@ -2824,7 +2824,8 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
|
||||
for (int i = 0; i < screenCount; i++) {
|
||||
final ViewGroup layout = ((CellLayout) getChildAt(i)).getChildrenLayout();
|
||||
final CellLayout layoutParent = (CellLayout) getChildAt(i);
|
||||
final ViewGroup layout = layoutParent.getChildrenLayout();
|
||||
|
||||
// Avoid ANRs by treating each screen separately
|
||||
post(new Runnable() {
|
||||
@@ -2911,7 +2912,9 @@ public class Workspace extends SmoothPagedView
|
||||
childCount = childrenToRemove.size();
|
||||
for (int j = 0; j < childCount; j++) {
|
||||
View child = childrenToRemove.get(j);
|
||||
layout.removeViewInLayout(child);
|
||||
// Note: We can not remove the view directly from CellLayoutChildren as this
|
||||
// does not re-mark the spaces as unoccupied.
|
||||
layoutParent.removeViewInLayout(child);
|
||||
if (child instanceof DropTarget) {
|
||||
mDragController.removeDropTarget((DropTarget)child);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user