Merge "Fix widget animation truncated at drop if a widget is resized" into sc-dev am: d9128413cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15159890 Change-Id: I633957630d467ac1af6de76cd25494412dff7957
This commit is contained in:
@@ -472,12 +472,12 @@ public class DragView extends FrameLayout implements StateListener<LauncherState
|
|||||||
mContent.draw(picture.beginRecording(mWidth, mHeight));
|
mContent.draw(picture.beginRecording(mWidth, mHeight));
|
||||||
picture.endRecording();
|
picture.endRecording();
|
||||||
View view = new View(mLauncher);
|
View view = new View(mLauncher);
|
||||||
view.setClipToOutline(mContent.getClipToOutline());
|
|
||||||
view.setOutlineProvider(mContent.getOutlineProvider());
|
|
||||||
view.setBackground(new PictureDrawable(picture));
|
view.setBackground(new PictureDrawable(picture));
|
||||||
view.measure(makeMeasureSpec(mWidth, EXACTLY), makeMeasureSpec(mHeight, EXACTLY));
|
view.measure(makeMeasureSpec(mWidth, EXACTLY), makeMeasureSpec(mHeight, EXACTLY));
|
||||||
view.layout(mContent.getLeft(), mContent.getTop(),
|
view.layout(mContent.getLeft(), mContent.getTop(),
|
||||||
mContent.getRight(), mContent.getBottom());
|
mContent.getRight(), mContent.getBottom());
|
||||||
|
setClipToOutline(mContent.getClipToOutline());
|
||||||
|
setOutlineProvider(mContent.getOutlineProvider());
|
||||||
addViewInLayout(view, indexOfChild(mContent), mContent.getLayoutParams(), true);
|
addViewInLayout(view, indexOfChild(mContent), mContent.getLayoutParams(), true);
|
||||||
|
|
||||||
removeViewInLayout(mContent);
|
removeViewInLayout(mContent);
|
||||||
|
|||||||
Reference in New Issue
Block a user