Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ba67529 authored by Raph Levien's avatar Raph Levien Committed by Android Git Automerger
Browse files

am adf14902: Merge "Fix for Text fading on RTL app names is done at the beginning..." into klp-dev

* commit 'adf14902':
  Fix for Text fading on RTL app names is done at the beginning...
parents b12db27b adf14902
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -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();
                        }
                }
            }
        }
@@ -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();
    }