mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
resolve merge conflicts of 25e37a85ae to sc-v2-dev
Change-Id: I78062d68d051a5f3c369214929f569b17c5a3471 Fix: 192532604 Bug: 192354264 Test: Manual Merged-In: If573641e4bb5a98ed6b5008e00f70f4bbe492c24
This commit is contained in:
@@ -20,15 +20,12 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Property;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
@@ -40,6 +37,7 @@ import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.dragndrop.DragController;
|
||||
import com.android.launcher3.dragndrop.DragLayer;
|
||||
import com.android.launcher3.dragndrop.DragOptions;
|
||||
import com.android.launcher3.dragndrop.DragView;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
|
||||
/**
|
||||
@@ -212,15 +210,20 @@ public abstract class ButtonDropTarget extends TextView
|
||||
return;
|
||||
}
|
||||
final DragLayer dragLayer = mLauncher.getDragLayer();
|
||||
final DragView dragView = d.dragView;
|
||||
final Rect to = getIconRect(d);
|
||||
final float scale = (float) to.width() / d.dragView.getMeasuredWidth();
|
||||
d.dragView.detachContentView(/* reattachToPreviousParent= */ true);
|
||||
final float scale = (float) to.width() / dragView.getMeasuredWidth();
|
||||
dragView.disableColorExtraction();
|
||||
dragView.detachContentView(/* reattachToPreviousParent= */ true);
|
||||
mDropTargetBar.deferOnDragEnd();
|
||||
|
||||
Runnable onAnimationEndRunnable = () -> {
|
||||
completeDrop(d);
|
||||
mDropTargetBar.onDragEnd();
|
||||
mLauncher.getStateManager().goToState(NORMAL);
|
||||
// Only re-enable updates once the workspace is back to normal, which will be after the
|
||||
// current frame.
|
||||
post(dragView::resumeColorExtraction);
|
||||
};
|
||||
|
||||
dragLayer.animateView(d.dragView, to, scale, 0.1f, 0.1f,
|
||||
|
||||
Reference in New Issue
Block a user