time-duration-picker
time-duration-picker copied to clipboard
Size not properly calculated in onMeasure
TimeDurationPicker.onMeasure doesn't properly set the size of the numPad.
// measure the numPad
// if we have more space available, we can try to grow the num pad
final int numPadWidth = Math.max(minNumPadHeight, displayRowWidth);
final int numPadHeight = Math.max(minNumPadHeight, preferredHeight - displayRowHeight);
numPad.measure(MeasureSpec.makeMeasureSpec(numPadWidth, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(numPadHeight, MeasureSpec.EXACTLY));
For the numPadWidth, I think you want minNumPadWidth instead of minNumPadHeight.
However, using Math.max doesn't work properly on smaller screens. If the available screen height is smaller than the minNumPadHeight, the height you set will be too large (similar for width), and the keyboard gets cut of. For example:

killing the zeroes.
I'd put in a pull request, but I don't know if this would kill the expected behavior from other users...