public class TimePicker extends FrameLayout
java.lang.Object ↳android.view.View ↳android.view.ViewGroup ↳android.widget.FrameLayout ↳android.widget.TimePickerA widget for selecting the time of day, in either 24-hour or AM/PM mode. 一个选择时间的控件,24小时模式或AM/PM模式。
For a dialog using this view, see TimePickerDialog. See the Pickers guide for more information. 使用此视图的一个对话框,请参考TimePickerDialog。请参考Pickers指南获取更多信息。
The callback interface used to indicate the time has been adjusted. 回调接口,用于表明时间已经被调整。
Return the class name of this object to be used for accessibility purposes. 返回此对象的类名,用于辅助功能目的。
intgetBaseline()Return the offset of the widget's text baseline from the widget's top boundary. 返回widget文本基线的偏移,其从widget的顶部边界开始。
IntegergetCurrentHour()This method was deprecated in API level 23. Use getHour() 此方法在API level 23版本中被删除。使用 getHour()
IntegergetCurrentMinute()This method was deprecated in API level 23. Use getMinute() 此方法在API level 23版本中被删除。使用 getMinute()
intgetHour()Returns the currently selected hour using 24-hour time. 返回当前已选择的小时(24小时模式)。
intgetMinute()Returns the currently selected minute. 返回当前已选择的分钟。
booleanis24HourView() booleanisEnabled()Returns the enabled status for this view. 返回此视图的使能状态。
voidsetCurrentHour(Integer currentHour)This method was deprecated in API level 23. Use setHour(int) 此方法在API level 23版本中被删除。使用 setHour(int)
voidsetCurrentMinute(Integer currentMinute)This method was deprecated in API level 23. Use setMinute(int) 此方法在API level 23版本中被删除。使用 setMinute(int)
voidsetEnabled(boolean enabled)Set the enabled state of this view. 设置此视图的使能状态。
voidsetHour(int hour)Sets the currently selected hour using 24-hour time. 设置当前已选择的小时(24小时模式)。
voidsetIs24HourView(Boolean is24HourView)Sets whether this widget displays time in 24-hour mode or 12-hour mode with an AM/PM picker. 设置此控件显示的时间模式,24小时模式或带AM/PM选取器的12小时模式。
voidsetMinute(int minute)Sets the currently selected minute. 设置当前已选择的分钟。
voidsetOnTimeChangedListener(TimePicker.OnTimeChangedListener onTimeChangedListener)Set the callback that indicates the time has been adjusted by the user. 设置回调,以通知用户已经调整了时间。
booleanvalidateInput()Validates whether current input by the user is a valid time based on the locale. 验证当前用户输入的时间是否本地的有效时间。
Hook allowing a view to re-apply a representation of its internal state that had previously been generated by onSaveInstanceState(). 由应用程序实现,以有机会允许视图重新应用以前由onSaveInstanceState()生成的内部状态。
ParcelableonSaveInstanceState()Hook allowing a view to generate a representation of its internal state that can later be used to create a new instance with that same state. 由应用程序实现,以有机会允许视图生成其内部状态,稍后可用于创建具有相同状态的新实例。
完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/TimePicker.html
