Loading core/java/android/widget/TextView.java +2 −4 Original line number Diff line number Diff line Loading @@ -10264,16 +10264,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener positionInfoStartIndex + positionInfoLength, viewportToContentHorizontalOffset(), viewportToContentVerticalOffset()); CursorAnchorInfo cursorAnchorInfo = builder.setMatrix(null).build(); if (mTempRect == null) mTempRect = new Rect(); Rect viewBoundsInScreen = mTempRect; info.getBoundsInScreen(viewBoundsInScreen); int[] locationOnScreen = getLocationOnScreen(); for (int i = 0; i < positionInfoLength; i++) { int flags = cursorAnchorInfo.getCharacterBoundsFlags(positionInfoStartIndex + i); if ((flags & FLAG_HAS_VISIBLE_REGION) == FLAG_HAS_VISIBLE_REGION) { RectF bounds = cursorAnchorInfo .getCharacterBounds(positionInfoStartIndex + i); if (bounds != null) { bounds.offset(viewBoundsInScreen.left, viewBoundsInScreen.top); bounds.offset(locationOnScreen[0], locationOnScreen[1]); boundingRects[i] = bounds; } } Loading Loading
core/java/android/widget/TextView.java +2 −4 Original line number Diff line number Diff line Loading @@ -10264,16 +10264,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener positionInfoStartIndex + positionInfoLength, viewportToContentHorizontalOffset(), viewportToContentVerticalOffset()); CursorAnchorInfo cursorAnchorInfo = builder.setMatrix(null).build(); if (mTempRect == null) mTempRect = new Rect(); Rect viewBoundsInScreen = mTempRect; info.getBoundsInScreen(viewBoundsInScreen); int[] locationOnScreen = getLocationOnScreen(); for (int i = 0; i < positionInfoLength; i++) { int flags = cursorAnchorInfo.getCharacterBoundsFlags(positionInfoStartIndex + i); if ((flags & FLAG_HAS_VISIBLE_REGION) == FLAG_HAS_VISIBLE_REGION) { RectF bounds = cursorAnchorInfo .getCharacterBounds(positionInfoStartIndex + i); if (bounds != null) { bounds.offset(viewBoundsInScreen.left, viewBoundsInScreen.top); bounds.offset(locationOnScreen[0], locationOnScreen[1]); boundingRects[i] = bounds; } } Loading