Loading core/java/android/widget/TextView.java +15 −2 Original line number Diff line number Diff line Loading @@ -7842,7 +7842,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener getCompoundPaddingLeft() - getCompoundPaddingRight() - mLayout.getLineLeft(0)) / getHorizontalFadingEdgeLength(); case Gravity.CENTER_HORIZONTAL: case Gravity.FILL_HORIZONTAL: final int textDirection = mLayout.getParagraphDirection(0); if (textDirection == Layout.DIR_LEFT_TO_RIGHT) { return 0.0f; } else { return (mLayout.getLineRight(0) - (mRight - mLeft) - getCompoundPaddingLeft() - getCompoundPaddingRight() - mLayout.getLineLeft(0)) / getHorizontalFadingEdgeLength(); } } } } Loading Loading @@ -7871,12 +7879,17 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return 0.0f; case Gravity.CENTER_HORIZONTAL: case Gravity.FILL_HORIZONTAL: final int textDirection = mLayout.getParagraphDirection(0); if (textDirection == Layout.DIR_RIGHT_TO_LEFT) { return 0.0f; } else { return (mLayout.getLineWidth(0) - ((mRight - mLeft) - getCompoundPaddingLeft() - getCompoundPaddingRight())) / getHorizontalFadingEdgeLength(); } } } } return super.getRightFadingEdgeStrength(); } Loading Loading
core/java/android/widget/TextView.java +15 −2 Original line number Diff line number Diff line Loading @@ -7842,7 +7842,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener getCompoundPaddingLeft() - getCompoundPaddingRight() - mLayout.getLineLeft(0)) / getHorizontalFadingEdgeLength(); case Gravity.CENTER_HORIZONTAL: case Gravity.FILL_HORIZONTAL: final int textDirection = mLayout.getParagraphDirection(0); if (textDirection == Layout.DIR_LEFT_TO_RIGHT) { return 0.0f; } else { return (mLayout.getLineRight(0) - (mRight - mLeft) - getCompoundPaddingLeft() - getCompoundPaddingRight() - mLayout.getLineLeft(0)) / getHorizontalFadingEdgeLength(); } } } } Loading Loading @@ -7871,12 +7879,17 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return 0.0f; case Gravity.CENTER_HORIZONTAL: case Gravity.FILL_HORIZONTAL: final int textDirection = mLayout.getParagraphDirection(0); if (textDirection == Layout.DIR_RIGHT_TO_LEFT) { return 0.0f; } else { return (mLayout.getLineWidth(0) - ((mRight - mLeft) - getCompoundPaddingLeft() - getCompoundPaddingRight())) / getHorizontalFadingEdgeLength(); } } } } return super.getRightFadingEdgeStrength(); } Loading