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

Commit ffb94391 authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "If we're not showing switch text, don't include in measure."

parents eff9661b e5994889
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -570,8 +570,8 @@ public class Switch extends CompoundButton {

        mTrackDrawable.getPadding(mTempRect);

        final int maxTextWidth = Math.max(mOnLayout.getWidth(), mOffLayout.getWidth())
                + mThumbTextPadding * 2;
        final int maxTextWidth = mShowText ? Math.max(mOnLayout.getWidth(), mOffLayout.getWidth())
                + mThumbTextPadding * 2 : 0;
        mThumbWidth = Math.max(maxTextWidth, mThumbDrawable.getIntrinsicWidth());

        final int switchWidth = Math.max(mSwitchMinWidth,