Skip to content

Commit f7c83bc

Browse files
committed
NumberPicker truncates the edited value.
1. NumberPicker aims to reach the specified max width and height. If the max width was not specified, the picker computes it by measuring the widest value it will show. However, the case for recognizing whether the max width is specified incorrect, hence the max width was never measured. bug:6193549 Change-Id: If67352a651e8d4a1d060868c876316e1c0e9bd0b
1 parent f21bea2 commit f7c83bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/NumberPicker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ public NumberPicker(Context context, AttributeSet attrs, int defStyle) {
579579
throw new IllegalArgumentException("minWidth > maxWidth");
580580
}
581581

582-
mComputeMaxWidth = (mMaxWidth == Integer.MAX_VALUE);
582+
mComputeMaxWidth = (mMaxWidth == SIZE_UNSPECIFIED);
583583

584584
attributesArray.recycle();
585585

0 commit comments

Comments
 (0)