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

Commit 8548dd41 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Align PIP dismiss target position/physics config with Bubbles'.

Fixes: 159250016
Test: manual
Change-Id: Ifa84671f5bf7eb15bd525f541faafe2ae01ac141
parent f21036b4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ public class PipTouchHandler {
    /** Default configuration to use for springing the dismiss target in/out. */
    private final PhysicsAnimator.SpringConfig mTargetSpringConfig =
            new PhysicsAnimator.SpringConfig(
                    SpringForce.STIFFNESS_MEDIUM, SpringForce.DAMPING_RATIO_NO_BOUNCY);
                    SpringForce.STIFFNESS_LOW, SpringForce.DAMPING_RATIO_LOW_BOUNCY);

    // The current movement bounds
    private Rect mMovementBounds = new Rect();
@@ -319,7 +319,9 @@ public class PipTouchHandler {
        final int targetSize = res.getDimensionPixelSize(R.dimen.dismiss_circle_size);
        final FrameLayout.LayoutParams newParams =
                new FrameLayout.LayoutParams(targetSize, targetSize);
        newParams.gravity = Gravity.CENTER;
        newParams.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
        newParams.bottomMargin = mContext.getResources().getDimensionPixelSize(
                R.dimen.floating_dismiss_bottom_margin);
        mTargetView.setLayoutParams(newParams);

        // Set the magnetic field radius equal to twice the size of the target.