Loading core/java/android/text/TextLine.java +6 −1 Original line number Diff line number Diff line Loading @@ -477,7 +477,12 @@ public class TextLine { } drawBounds.setEmpty(); float w = measure(mLen, false, fmi, drawBounds, lineInfo); float boundsWidth = drawBounds.width(); float boundsWidth; if (w >= 0) { boundsWidth = Math.max(drawBounds.right, w) - Math.min(0, drawBounds.left); } else { boundsWidth = Math.max(drawBounds.right, 0) - Math.min(w, drawBounds.left); } if (Math.abs(w) > boundsWidth) { return w; } else { Loading core/java/android/widget/TextView.java +4 −2 Original line number Diff line number Diff line Loading @@ -11254,8 +11254,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener width = des; } else { if (mUseBoundsForWidth) { width = Math.max(boring.width, (int) Math.ceil(boring.getDrawingBoundingBox().width())); RectF bbox = boring.getDrawingBoundingBox(); float rightMax = Math.max(bbox.right, boring.width); float leftMin = Math.min(bbox.left, 0); width = Math.max(boring.width, (int) Math.ceil(rightMax - leftMin)); } else { width = boring.width; } Loading Loading
core/java/android/text/TextLine.java +6 −1 Original line number Diff line number Diff line Loading @@ -477,7 +477,12 @@ public class TextLine { } drawBounds.setEmpty(); float w = measure(mLen, false, fmi, drawBounds, lineInfo); float boundsWidth = drawBounds.width(); float boundsWidth; if (w >= 0) { boundsWidth = Math.max(drawBounds.right, w) - Math.min(0, drawBounds.left); } else { boundsWidth = Math.max(drawBounds.right, 0) - Math.min(w, drawBounds.left); } if (Math.abs(w) > boundsWidth) { return w; } else { Loading
core/java/android/widget/TextView.java +4 −2 Original line number Diff line number Diff line Loading @@ -11254,8 +11254,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener width = des; } else { if (mUseBoundsForWidth) { width = Math.max(boring.width, (int) Math.ceil(boring.getDrawingBoundingBox().width())); RectF bbox = boring.getDrawingBoundingBox(); float rightMax = Math.max(bbox.right, boring.width); float leftMin = Math.min(bbox.left, 0); width = Math.max(boring.width, (int) Math.ceil(rightMax - leftMin)); } else { width = boring.width; } Loading