Skip to content

Commit af43add

Browse files
Luca ZanolinAndroid (Google) Code Review
authored andcommitted
Merge "The x and y position of the pop-up where not calculated correctly when the text view had internal scrolling."
2 parents 5c06f0f + a403cb7 commit af43add

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/widget/TextView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9480,8 +9480,8 @@ public boolean isVisible(int positionX, int positionY) {
94809480
return false;
94819481
}
94829482

9483-
int posX = mPositionX + positionX;
9484-
int posY = mPositionY + positionY;
9483+
int posX = mPositionX + positionX - getScrollX();
9484+
int posY = mPositionY + positionY - getScrollY();
94859485

94869486
// Offset by 1 to take into account 0.5 and int rounding around getPrimaryHorizontal.
94879487
return posX >= clip.left - 1 && posX <= clip.right + 1 &&

0 commit comments

Comments
 (0)