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

Commit bbd8226e authored by Fabrice Di Meglio's avatar Fabrice Di Meglio Committed by Android (Google) Code Review
Browse files

Merge "More fixes about padding"

parents 940fcbdd bf923ebb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -160,6 +160,12 @@ public class CheckedTextView extends TextView implements Checkable {
        mBasePadding = mPaddingRight;
    }

    @Override
    public void setPaddingRelative(int start, int top, int end, int bottom) {
        super.setPaddingRelative(start, top, end, bottom);
        mBasePadding = getPaddingEnd();
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
+14 −0
Original line number Diff line number Diff line
@@ -2079,6 +2079,20 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        invalidate();
    }

    @Override
    public void setPaddingRelative(int start, int top, int end, int bottom) {
        if (start != getPaddingStart() ||
            end != getPaddingEnd() ||
            top != mPaddingTop ||
            bottom != mPaddingBottom) {
            nullLayouts();
        }

        // the super call will requestLayout()
        super.setPaddingRelative(start, top, end, bottom);
        invalidate();
    }

    /**
     * Gets the autolink mask of the text.  See {@link
     * android.text.util.Linkify#ALL Linkify.ALL} and peers for