Merge "If we're not showing switch text, don't include in measure."
This commit is contained in:
committed by
Android (Google) Code Review
commit
ffb9439172
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user