完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/TimePicker.html
TimePicker
public class TimePicker
extends FrameLayout
java.lang.Object | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | android.widget.FrameLayout | |||
↳ | android.widget.TimePicker |
A 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指南获取更多信息。
摘要
嵌套类 | |
---|---|
interface | TimePicker.OnTimeChangedListener The callback interface used to indicate the time has been adjusted. |
XML属性 | |
---|---|
android:timePickerMode | 设定widget的外观。 |
继承XML属性 | |
---|---|
From class android.widget.FrameLayout
| |
From class android.view.ViewGroup
| |
From class android.view.View
|
继承常量 |
---|
From class android.view.ViewGroup
|
From class android.view.View
|
继承字段 |
---|
From class android.view.View
|
Public构造方法 | |
---|---|
TimePicker(Context context) | |
TimePicker(Context context, AttributeSet attrs) | |
TimePicker(Context context, AttributeSet attrs, int defStyleAttr) | |
TimePicker(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) |
Public方法 | |
---|---|
CharSequence | getAccessibilityClassName() Return the class name of this object to be used for accessibility purposes. |
int | getBaseline() Return the offset of the widget's text baseline from the widget's top boundary. |
Integer | getCurrentHour() This method was deprecated in API level 23. Use |
Integer | getCurrentMinute() This method was deprecated in API level 23. Use |
int | getHour() Returns the currently selected hour using 24-hour time. |
int | getMinute() Returns the currently selected minute. |
boolean | is24HourView() |
boolean | isEnabled() Returns the enabled status for this view. |
void | setCurrentHour(Integer currentHour) This method was deprecated in API level 23. Use |
void | setCurrentMinute(Integer currentMinute) This method was deprecated in API level 23. Use |
void | setEnabled(boolean enabled) Set the enabled state of this view. |
void | setHour(int hour) Sets the currently selected hour using 24-hour time. |
void | setIs24HourView(Boolean is24HourView) Sets whether this widget displays time in 24-hour mode or 12-hour mode with an AM/PM picker. |
void | setMinute(int minute) Sets the currently selected minute. |
void | setOnTimeChangedListener(TimePicker.OnTimeChangedListener onTimeChangedListener) Set the callback that indicates the time has been adjusted by the user. |
boolean | validateInput() Validates whether current input by the user is a valid time based on the locale. |
保护方法 | |
---|---|
void | onRestoreInstanceState(Parcelable state) Hook allowing a view to re-apply a representation of its internal state that had previously been generated by |
Parcelable | onSaveInstanceState() 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