|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.View
android.view.ViewGroup
android.widget.FrameLayout
android.widget.TimePicker
public class TimePicker
A view for selecting the time of day, in either 24 hour or AM/PM mode.
The hour, each minute digit, and AM/PM (if applicable) can be conrolled by
vertical spinners.
The hour can be entered by keyboard input. Entering in two digit hours
can be accomplished by hitting two digits within a timeout of about a
second (e.g. '1' then '2' to select 12).
The minutes can be entered by entering single digits.
Under AM/PM mode, the user can hit 'a', 'A", 'p' or 'P' to pick.
For a dialog using this view, see TimePickerDialog.
| Nested Class Summary | |
|---|---|
static interface |
TimePicker.OnTimeChangedListener
The callback interface used to indicate the time has been adjusted. |
| Nested classes/interfaces inherited from class android.widget.FrameLayout |
|---|
FrameLayout.LayoutParams |
| Nested classes/interfaces inherited from class android.view.ViewGroup |
|---|
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener |
| Nested classes/interfaces inherited from class android.view.View |
|---|
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener |
| Field Summary |
|---|
| Fields inherited from class android.widget.FrameLayout |
|---|
mMeasureAllChildren |
| Constructor Summary | |
|---|---|
TimePicker(Context context)
|
|
TimePicker(Context context,
AttributeSet attrs)
|
|
TimePicker(Context context,
AttributeSet attrs,
int defStyle)
|
|
| Method Summary | |
|---|---|
int |
getBaseline()
Return the offset of the widget's text baseline from the widget's top boundary. |
Integer |
getCurrentHour()
|
Integer |
getCurrentMinute()
|
boolean |
is24HourView()
|
protected void |
onRestoreInstanceState(Parcelable state)
Hook allowing a view to re-apply a representation of its internal state that had previously been generated by View.onSaveInstanceState(). |
protected 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. |
void |
setCurrentHour(Integer currentHour)
Set the current hour. |
void |
setCurrentMinute(Integer currentMinute)
Set the current minute (0-59). |
void |
setEnabled(boolean enabled)
Set the enabled state of this view. |
void |
setIs24HourView(Boolean is24HourView)
Set whether in 24 hour or AM/PM mode. |
void |
setOnTimeChangedListener(TimePicker.OnTimeChangedListener onTimeChangedListener)
Set the callback that indicates the time has been adjusted by the user. |
| Methods inherited from class android.widget.FrameLayout |
|---|
checkLayoutParams, draw, drawableStateChanged, gatherTransparentRegion, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getConsiderGoneChildrenWhenMeasuring, getForeground, onLayout, onMeasure, onSizeChanged, setForeground, setForegroundGravity, setMeasureAllChildren, verifyDrawable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface android.view.ViewParent |
|---|
createContextMenu, getParent, isLayoutRequested, requestLayout |
| Constructor Detail |
|---|
public TimePicker(Context context)
public TimePicker(Context context,
AttributeSet attrs)
public TimePicker(Context context,
AttributeSet attrs,
int defStyle)
| Method Detail |
|---|
public void setEnabled(boolean enabled)
View
setEnabled in class Viewenabled - True if this view is enabled, false otherwise.protected Parcelable onSaveInstanceState()
ViewSome examples of things you may store here: the current cursor position in a text view (but usually not the text itself since that is stored in a content provider or other persistent storage), the currently selected item in a list view.
onSaveInstanceState in class ViewView.onRestoreInstanceState(android.os.Parcelable),
View.saveHierarchyState(android.util.SparseArray) ,
View.dispatchSaveInstanceState(android.util.SparseArray) ,
View.setSaveEnabled(boolean)protected void onRestoreInstanceState(Parcelable state)
ViewView.onSaveInstanceState(). This function will never be called with a
null state.
onRestoreInstanceState in class Viewstate - The frozen state that had previously been returned by
View.onSaveInstanceState().View.onSaveInstanceState(),
View.restoreHierarchyState(android.util.SparseArray) ,
View.dispatchRestoreInstanceState(android.util.SparseArray) public void setOnTimeChangedListener(TimePicker.OnTimeChangedListener onTimeChangedListener)
onTimeChangedListener - the callback, should not be null.public Integer getCurrentHour()
public void setCurrentHour(Integer currentHour)
public void setIs24HourView(Boolean is24HourView)
is24HourView - True = 24 hour mode. False = AM/PM.public boolean is24HourView()
public Integer getCurrentMinute()
public void setCurrentMinute(Integer currentMinute)
public int getBaseline()
ViewReturn the offset of the widget's text baseline from the widget's top boundary. If this widget does not support baseline alignment, this method returns -1.
getBaseline in class View
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||