- The following
NumberPadTimePickerAPIs are no longer public:setNumberKeysEnabled(),setBackspaceEnabled(),updateTimeDisplay(),updateAmPmDisplay(),setAmPmDisplayVisible(),setAmPmDisplayIndex(),setLeftAltKeyText(),setRightAltKeyText(),setLeftAltKeyEnabled(),setRightAltKeyEnabled(),setOkButtonEnabled(),setResult(),showOkButton(). These are implementation details and you should not have called them. - Reduced library size by about 2 KB.
- Use
NumberPadTimePickeras aViewin your own layouts. - New
NumberPadTimePickerAPIs:OkButtonCallbacksinterface allows you to use a custom, externally-defined "OK" button with the time picker. It is also how you will retrieve the selected time if you are usingNumberPadTimePickeras aView. Set withsetOkButtonCallbacks().confirmTimeSelection()calls yourOkButtonCallbacks.onOkButtonClick()and returns the selected time.getLayout()returns a constant representing the layout, which determines the presence and appearance of dialog buttons. Return values:LAYOUT_STANDALONE,LAYOUT_ALERT,LAYOUT_BOTTOM_SHEET.setCancelButtonClickListener()sets aView.OnClickListeneron the time picker's cancel button, which is present only inLAYOUT_ALERT.getThemer()returns aNumberPadTimePickerThemerthat can be casted toBottomSheetNumberPadTimePickerThemerif the layout isLAYOUT_BOTTOM_SHEET.
NumberPadTimePickerThemerandBottomSheetNumberPadTimePickerThemerare now public. These are the super classes ofNumberPadTimePickerDialogThemerandBottomSheetNumberPadTimePickerDialogThemer, respectively.- New styleable attributes:
nptp_numberPadTimePickerLayoutdetermines the presence and appearance of additional dialog buttons. Possible values:standalone,alert,bottomSheet.nptp_is24HourModeindicates whether the number pad should use 24-hour mode.
- New style resources:
NPTP_Base_NumberPadTimePickerStandaloneStyleNPTP_Base_NumberPadTimePickerAlertStyleNPTP_Base_NumberPadTimePickerBottomSheetStyleNPTP_NumberPadTimePickerStandaloneStyle_FillHeightNPTP_NumberPadTimePickerStandaloneStyle_ExactHeightNPTP_NumberPadTimePickerAlertStyle_FillHeightNPTP_NumberPadTimePickerAlertStyle_ExactHeightNPTP_NumberPadTimePickerBottomSheetStyle_FillHeightNPTP_NumberPadTimePickerBottomSheetStyle_ExactHeight
- Deprecated style resources:
NPTP_NumberPadTimePickerStyle. UseNPTP_Base_NumberPadTimePickerAlertStyleinstead.NPTP_NumberPadTimePickerBottomSheetStyle. UseNPTP_Base_NumberPadTimePickerBottomSheetStyleinstead.
- Updated sample app to demo use of
NumberPadTimePickeras aView.
NumberPadTimePickeris not optimized for small screen heights (e.g. in landscape). If the full view cannot fit in the current screen height, the top portion of its contents will be stretched out and the remaining portion cannot be seen.
BottomSheetNumberPadTimePickerDialogenter animation is janky and distorted in landscape mode for SDK 23+BottomSheetNumberPadTimePickerDialogis raised slightly away from screen edge in landscape mode for SDK 23+
Initial release