Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2c454ba authored by Steven Ng's avatar Steven Ng Committed by Android (Google) Code Review
Browse files

Merge "Turn DragView into a FrameLayout" into sc-dev

parents 9ad5b60c e36664d5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -183,7 +183,6 @@ public abstract class ButtonDropTarget extends TextView
        hideTooltip();

        if (!d.dragComplete) {
            d.dragView.setColor(0);
            d.dragView.setAlpha(1f);
        } else {
            d.dragView.setAlpha(DRAG_VIEW_HOVER_OVER_OPACITY);
+1 −3
Original line number Diff line number Diff line
@@ -1571,7 +1571,6 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
                scale * iconScale,
                scale,
                dragOptions);
        dv.setIntrinsicIconScaleFactor(dragOptions.intrinsicIconScaleFactor);
        return dv;
    }

@@ -2723,8 +2722,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
                info.itemType == LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET;
        if ((animationType == ANIMATE_INTO_POSITION_AND_RESIZE || external) && finalView != null) {
            Drawable crossFadeDrawable = createWidgetDrawable(info, finalView);
            dragView.setCrossFadeDrawable(crossFadeDrawable);
            dragView.crossFade((int) (duration * 0.8f));
            dragView.crossFadeContent(crossFadeDrawable, (int) (duration * 0.8f));
        } else if (isWidget && external) {
            scaleXY[0] = scaleXY[1] = Math.min(scaleXY[0],  scaleXY[1]);
        }
+2 −5
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DragSource;
import com.android.launcher3.DropTarget.DragObject;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.util.ActivityTracker.SchedulerCallback;
import com.android.launcher3.widget.PendingItemDragHelper;

@@ -143,15 +142,13 @@ public abstract class BaseItemDragListener implements View.OnDragListener, DragS
        // the dragLayer alpha to 0 to have a nice fade-in animation. But that will prevent the
        // dragView from being visible. Instead just skip the fade-in animation here.
        mLauncher.getDragLayer().setAlpha(1);

        dragObject.dragView.setColor(
                mLauncher.getResources().getColor(R.color.delete_target_hover_tint));
        dragObject.dragView.setAlpha(.5f);
    }

    @Override
    public void onPreDragEnd(DragObject dragObject, boolean dragStarted) {
        if (dragStarted) {
            dragObject.dragView.setColor(0);
            dragObject.dragView.setAlpha(1f);
        }
    }

+162 −268

File changed.

Preview size limit exceeded, changes collapsed.

+0 −3
Original line number Diff line number Diff line
@@ -70,9 +70,6 @@ public class FlingAnimation implements AnimatorUpdateListener, Runnable {

        mAnimationTimeFraction = ((float) mDuration) / (mDuration + DRAG_END_DELAY);

        // Don't highlight the icon as it's animating
        mDragObject.dragView.setColor(0);

        final int duration = mDuration + DRAG_END_DELAY;
        final long startTime = AnimationUtils.currentAnimationTimeMillis();