Fix resize frame bug: 4121297
Change-Id: I797c9af3ed0a0c99407c301e68d20485e108980c
This commit is contained in:
1 parent
3fb17bb232
commit
26976d9b53
2 files changed
+20
-1
No files matched your search
@@ -213,6 +213,7 @@ public class Workspace extends SmoothPagedView
|
||||
WallpaperOffsetInterpolator mWallpaperOffset;
|
||||
boolean mUpdateWallpaperOffsetImmediately = false;
|
||||
boolean mSyncWallpaperOffsetWithScroll = true;
|
||||
private Runnable mDelayedResizeRunnable;
|
||||
|
||||
// info about the last drag
|
||||
private DragView mLastDragView;
|
||||
@@ -645,6 +646,11 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
mOverScrollMaxBackgroundAlpha = 0.0f;
|
||||
mOverScrollPageIndex = -1;
|
||||
|
||||
if (mDelayedResizeRunnable != null) {
|
||||
mDelayedResizeRunnable.run();
|
||||
mDelayedResizeRunnable = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2366,13 +2372,22 @@ public class Workspace extends SmoothPagedView
|
||||
final LauncherAppWidgetHostView hostView = (LauncherAppWidgetHostView) cell;
|
||||
AppWidgetProviderInfo pinfo = hostView.getAppWidgetInfo();
|
||||
if (pinfo.resizeMode != AppWidgetProviderInfo.RESIZE_NONE) {
|
||||
post(new Runnable() {
|
||||
final Runnable resizeRunnable = new Runnable() {
|
||||
public void run() {
|
||||
DragLayer dragLayer = (DragLayer)
|
||||
mLauncher.findViewById(R.id.drag_layer);
|
||||
dragLayer.addResizeFrame(info, hostView,
|
||||
cellLayout);
|
||||
}
|
||||
};
|
||||
post(new Runnable() {
|
||||
public void run() {
|
||||
if (!isPageMoving()) {
|
||||
resizeRunnable.run();
|
||||
} else {
|
||||
mDelayedResizeRunnable = resizeRunnable;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user