Skip to content

Commit

Permalink
Editor: Disable magnifier position animation
Browse files Browse the repository at this point in the history
In my opinion, this animation serves no purpose because it doesn't
correspond to any animations in the text selection/handle flow, and is
barely noticeable in typical text selection cases. In addition, it makes
the magnifier feel slow/laggy when selecting a large block of text
quickly.

Change-Id: I5fed9fc06db4491dc2811815741830001d295030
  • Loading branch information
kdrag0n committed Jun 7, 2022
1 parent 922d7b1 commit 45341c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/java/android/widget/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -4667,7 +4667,7 @@ private MagnifierMotionAnimator(final Magnifier magnifier) {
* animation is added to the jump.
*/
private void show(final float x, final float y) {
final boolean startNewAnimation = mMagnifierIsShowing && y != mLastY;
final boolean startNewAnimation = false;

if (startNewAnimation) {
if (mAnimator.isRunning()) {
Expand Down

0 comments on commit 45341c8

Please sign in to comment.