diff options
Diffstat (limited to 'java/com/android/newbubble/NewMoveHandler.java')
-rw-r--r-- | java/com/android/newbubble/NewMoveHandler.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/java/com/android/newbubble/NewMoveHandler.java b/java/com/android/newbubble/NewMoveHandler.java index 9cb1f1eca..9e6d95553 100644 --- a/java/com/android/newbubble/NewMoveHandler.java +++ b/java/com/android/newbubble/NewMoveHandler.java @@ -88,6 +88,7 @@ class NewMoveHandler implements OnTouchListener { @Override public void setValue(LayoutParams windowParams, float value) { + boolean wasOnRight = (windowParams.gravity & Gravity.RIGHT) == Gravity.RIGHT; int displayWidth = context.getResources().getDisplayMetrics().widthPixels; boolean onRight; Integer gravityOverride = bubble.getGravityOverride(); @@ -108,7 +109,9 @@ class NewMoveHandler implements OnTouchListener { windowParams.gravity = Gravity.TOP | (onRight ? Gravity.RIGHT : Gravity.LEFT); if (bubble.isVisible()) { windowManager.updateViewLayout(bubble.getRootView(), windowParams); - bubble.onLeftRightSwitch(onRight); + if (onRight != wasOnRight) { + bubble.onLeftRightSwitch(onRight); + } } } }; |