From 59bccf2a70581e4a0ba3abcb8b7cdcde387af95e Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 7 Feb 2020 11:17:29 +0800 Subject: [PATCH] Don't show magnifier with animation for the new fisheye magnifier. The new fisheye magnifier is showed inline on the text. It doens't make sense to have an animation when switching lines vertically. Test: locally verfiied. Bug: 149058653 Change-Id: I36b6894f6954a8adf5a3097ebb7a5c5def292d07 --- core/java/android/widget/Editor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java index 4e4a9837b32c4..2b9356779ef8b 100644 --- a/core/java/android/widget/Editor.java +++ b/core/java/android/widget/Editor.java @@ -5111,8 +5111,10 @@ public class Editor { int lineRight = (int) layout.getLineRight(line); lineRight += mTextView.getTotalPaddingLeft() - mTextView.getScrollX(); mMagnifierAnimator.mMagnifier.setSourceHorizontalBounds(lineLeft, lineRight); + mMagnifierAnimator.mMagnifier.show(showPosInView.x, showPosInView.y); + } else { + mMagnifierAnimator.show(showPosInView.x, showPosInView.y); } - mMagnifierAnimator.show(showPosInView.x, showPosInView.y); updateHandlesVisibility(); } else { dismissMagnifier();