ComponentParentpublic class TimePicker extends StackLayout
This class can be used in countdown time selection. Either the 24-hour or 12-hour time mode can be selected.
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
TimePicker.AmPmOrder |
Defines the display format of the column representing a.m.
|
static interface |
TimePicker.TimeChangedListener |
Provides a time change listener.
|
Component.BindStateChangedListener, Component.CanAcceptScrollListener, Component.ClickedListener, Component.ComponentStateChangedListener, Component.ContourRefreshedListener, Component.DefSpeechEventListener, Component.DoubleClickedListener, Component.DragFeedbackProvider, Component.DraggedListener, Component.DrawTask, Component.EditEventListener, Component.EstimateSizeListener, Component.EstimateSpec, Component.FadeEffectEnum, Component.FocusChangedListener, Component.ForwardHoverListener, Component.ForwardTouchListener, Component.GestureType, Component.HoverEventListener, Component.KeyEventListener, Component.LayoutDirection, Component.LayoutRefreshedListener, Component.LongClickedListener, Component.MeasureSpec, Component.MouseEventListener, Component.MousePointerStyleListener, Component.OnDragListener, Component.RotationEventListener, Component.ScaledListener, Component.ScrolledListener, Component.ShadowDevice, Component.ShadowMode, Component.ShadowSize, Component.SpeechEventListener, Component.TouchEventListener, Component.UnconsumedKeyEventListener, Component.VoiceEventComponentContainer.ArrangeListenerStackLayout.LayoutConfig| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected TimePicker.TimeChangedListener |
mTimeChangedListener |
Indicates the listener
TimePicker.TimeChangedListener to listen for the change of the selected time. |
static float |
ROTATION_SENSITIVITY_DEFAULT |
Indicates the default rotation sensitivity of
TimePicker to respond to rotating crown events. |
static float |
ROTATION_SENSITIVITY_HIGH |
Indicates the high rotation sensitivity of
TimePicker to respond to rotating crown events. |
static float |
ROTATION_SENSITIVITY_LOW |
Indicates the low rotation sensitivity of
TimePicker to respond to rotating crown events. |
ACCESSIBILITY_ADAPTABLE, ACCESSIBILITY_DISABLE, ACCESSIBILITY_ENABLE, AXIS_X, AXIS_Y, CONTOUR_BACKGROUND, CONTOUR_BORDER, CONTOUR_PADDING_BORDER, DEFAULT_SCALE, DRAG_DOWN, DRAG_HORIZONTAL, DRAG_HORIZONTAL_VERTICAL, DRAG_LEFT, DRAG_RIGHT, DRAG_UP, DRAG_VERTICAL, EVENT_TYPE_COMPONENT_ACCESSIBILITY_FOCUSED, EVENT_TYPE_COMPONENT_ACCESSIBILITY_FOCUSED_CLEAR, EVENT_TYPE_COMPONENT_CLICKED, EVENT_TYPE_COMPONENT_FOCUSED, EVENT_TYPE_COMPONENT_LONG_CLICKED, EVENT_TYPE_COMPONENT_SCROLLED, EVENT_TYPE_COMPONENT_SELECTED, EVENT_TYPE_COMPONENT_TEXT_UPDATE, EVENT_TYPE_NOTICE, EVENT_TYPE_NOTIFICATION_STATE_UPDATE, EVENT_TYPE_TOAST_SHOW, EVENT_TYPE_WINDOW_STATE_UPDATE, FOCUS_ADAPTABLE, FOCUS_DISABLE, FOCUS_ENABLE, FOCUS_NEXT, FOCUS_PREVIOUS, FOCUS_SIDE_BOTTOM, FOCUS_SIDE_LEFT, FOCUS_SIDE_RIGHT, FOCUS_SIDE_TOP, HIDE, HORIZONTAL, ID_DEFAULT, INHERITED_MODE, INVISIBLE, mBackgroundElement, mCanvasForTaskOverContent, mCanvasForTaskUnderContent, mComponentParent, mContext, mDrawTaskOverContent, mDrawTaskUnderContent, mEstimateSizeListener, mForegroundElement, mForwardHoverListener, mHoverEventListener, mKeyEventListener, mMouseEventListener, mPosition, mRotationEventListener, mShadowElement, mUnconsumedKeyEventListener, OVAL_MODE, OVAL_SCROLL_BAR_MODE, POSITION_X_INDEX, POSITION_Y_INDEX, RECT_MODE, RECT_SCROLL_BAR_MODE, SCROLL_AUTO_STAGE, SCROLL_IDLE_STAGE, SCROLL_NORMAL_STAGE, UNSPECIFIED_SCROLL_BAR_MODE, VERTICAL, VISIBLEFOCUS_CHILDREN_FIRST, FOCUS_CHILDREN_HIDE, FOCUS_PARENT_FIRST, mArrangeListener| 构造器 | 说明 |
|---|---|
TimePicker(Context context) |
Default constructor used to create a
TimePicker instance by using the default attribute set and style. |
TimePicker(Context context,
AttrSet attrSet) |
A constructor used to create a
TimePicker instance by using specified attribute set and default style
after the XML file is parsed. |
TimePicker(Context context,
AttrSet attrSet,
String styleName) |
A constructor used to create a
TimePicker instance by using specified attribute set and specified style
after the XML file is parsed. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
enableHour(boolean enable) |
Sets whether to enable the hour selector.
|
void |
enableMinute(boolean enable) |
Sets whether to enable the minute selector.
|
void |
enableSecond(boolean enable) |
Sets whether to enable the second selector.
|
TimePicker.AmPmOrder |
getAmPmOrder() |
Obtains the format of the column representing a.m.
|
String[] |
getAmPmStrings() |
Obtains a string array indicating a.m.
|
String |
getAmString() |
Obtains the string that represents a.m.
|
Element |
getDisplayedBottomElement() |
Obtains the
Element instance used to draw the split line at the bottom of a selected number in the
time picker. |
Element[] |
getDisplayedLinesElements() |
Obtains an array of instances used to draw split lines in this time picker.
|
Element |
getDisplayedTopElement() |
Obtains the
Element instance of the top split line in this time picker. |
int |
getHour() |
Obtains the selected hour.
|
int |
getMinute() |
Obtains the selected minute.
|
Color |
getNormalTextColor() |
Gets the normal font color of the time displayed in the time picker.
|
Font |
getNormalTextFont() |
Obtains the font of the normal text in this time picker.
|
int |
getNormalTextSize() |
Gets the normal font size of the time displayed in the time picker.
|
Element |
getOperatedTextBackgroundElement() |
Obtains the
Element set as the text background of the selected item that is being operated. |
Color |
getOperatedTextColor() |
Obtains the color of the operated text in the time picker.
|
String |
getPmString() |
Obtains the string represents p.m.
|
void |
getRange(int[] ranges) |
Obtains the time range that can be selected.
|
int |
getSecond() |
Obtains the selected second.
|
float |
getSelectedNormalTextMarginRatio() |
Obtains the ratio of the selected to normal text margin in this time picker.
|
Element |
getSelectedTextBackgroundElement() |
Obtains the
Element set as the background of the text selected in this time picker. |
Color |
getSelectedTextColor() |
Gets the selected font color of the time displayed in the time picker.
|
Font |
getSelectedTextFont() |
Obtains the font of the selected text in this time picker.
|
int |
getSelectedTextSize() |
Gets the selected font size of the time displayed in the time picker.
|
int |
getSelectorItemNum() |
Obtains the number of items displayed on a selector.
|
Color |
getShaderColor() |
Obtains the shader color of the time picker.
|
TimePicker.TimeChangedListener |
getTimeChangedListener() |
Obtains the callback object used to listen for time change events of this picker.
|
boolean |
is24Hour() |
Obtains whether the time is displayed in 24-hour mode.
|
boolean |
isHourEnabled() |
Obtains whether the hour selector is enabled.
|
boolean |
isHourShown() |
Obtains the state of the hour selector.
|
boolean |
isMinuteEnabled() |
Obtains whether the minute selector is enabled.
|
boolean |
isMinuteShown() |
Obtains the state of the minute selector.
|
boolean |
isSecondEnabled() |
Obtains whether the second selector is enabled.
|
boolean |
isSecondShown() |
Obtains the state of the second selector.
|
boolean |
isWheelModeEnabled() |
Obtains whether wheel mode is enabled for the selector wheel of a time picker.
|
void |
set24Hour(boolean is24Hour) |
Sets whether to display the time in 24-hour mode.
|
void |
setAmPmOrder(TimePicker.AmPmOrder order) |
Sets the format of the column representing a.m.
|
void |
setAmPmStrings(String am,
String pm) |
Sets character strings that represent a.m.
|
void |
setAmString(String am) |
Sets the string that represents a.m.
|
void |
setDisplayedBottomElement(Element bottom) |
Sets the split line at the bottom of a selected number in this time picker.
|
void |
setDisplayedLinesElements(Element top,
Element bottom) |
Sets a
Element instance to draw the split line for selected text in the time picker. |
void |
setDisplayedTopElement(Element top) |
Sets the split line on the top of a selected number in this time picker.
|
void |
setHour(int hour) |
Sets the selected hour.
|
void |
setMinute(int minute) |
Sets the selected minute.
|
void |
setNormalTextColor(Color color) |
Sets the normal font color of the time displayed in the time picker.
|
void |
setNormalTextFont(Font font) |
Sets the font for the normal text in this time picker.
|
void |
setNormalTextSize(int size) |
Sets the normal font size of the time displayed in the time picker.
|
void |
setOperatedTextBackground(Element element) |
Sets the specified
Element as the text background of the selected item that is being operated. |
void |
setOperatedTextColor(Color color) |
Sets the color of the operated text in the time picker.
|
void |
setPmString(String pm) |
Sets the string that represents p.m.
|
void |
setRange(int[] ranges) |
Sets the time range that can be selected.
|
void |
setSecond(int second) |
Sets the selected second.
|
void |
setSelectedNormalTextMarginRatio(float textMarginRatio) |
Sets the ratio of the selected to normal text margin in this time picker.
|
void |
setSelectedTextBackground(Element element) |
Sets the specified
Element as the background of the selected text in this time picker. |
void |
setSelectedTextColor(Color color) |
Sets the selected font color of the time displayed in the time picker.
|
void |
setSelectedTextFont(Font font) |
Sets the font for the selected text in this time picker.
|
void |
setSelectedTextSize(int size) |
Sets the selected font size of the time displayed in the time picker.
|
void |
setSelectorItemNum(int itemNum) |
Sets the number of items to display on a selector.
|
void |
setShaderColor(Color color) |
Sets a shader color for the time picker.
|
void |
setTimeChangedListener(TimePicker.TimeChangedListener listener) |
Sets the listener
TimePicker.TimeChangedListener to listen for the change of the selected time. |
void |
setWheelModeEnabled(boolean isEnabled) |
Sets whether to enable wheel mode for the selector wheel of a time picker.
|
void |
showHour(boolean show) |
Sets whether to show the hour selector.
|
void |
showMinute(boolean show) |
Sets whether to show the minute selector.
|
void |
showSecond(boolean show) |
Sets whether to show the second selector.
|
addDrawTask, addDrawTask, addScrolledListener, announceAccessibility, arrange, bindCornerMark, callOnClick, canScroll, clearFocus, createAnimatorProperty, disableFadeEffect, draw, enableCornerMark, enableFadeEffect, enableSaveState, enableScrollBar, estimateSize, executeDoubleClick, executeLongClick, findFocus, findNextFocusableComponent, findRequestNextFocus, getAccessibility, getAccessibilityDescription, getAlpha, getAltitude, getBackgroundElement, getBaseLine, getBottom, getBoundaryFadeEffectBottomRate, getBoundaryFadeEffectLeftRate, getBoundaryFadeEffectRightRate, getBoundaryFadeEffectTopRate, getCenterZoomFactor, getCentralScrollMode, getClickedListener, getClipEnabled, getComponentDescription, getComponentMinSize, getComponentParent, getComponentPosition, getComponentSize, getComponentStateChangedListener, getComponentTreeObserver, getContentEnable, getContentPosition, getContentPositionX, getContentPositionY, getContext, getContour, getContourRefreshedListener, getCornerMark, getDragAcceptAngle, getDraggedListener, getEditEventListener, getEstimatedHeight, getEstimatedWidth, getFadeEffectBoundaryWidth, getFadeEffectColor, getFocusable, getFocusBorderEnable, getFocusBorderPadding, getFocusBorderRadius, getFocusBorderWidth, getForegroundElement, getForegroundGravity, getForwardHoverListener, getForwardTouchListener, getGesturePriority, getHeight, getHorizontalPadding, getHorizontalPosition, getHoverEventListener, getId, getKeyEventListener, getLayoutConfig, getLayoutDirection, getLayoutDirectionResolved, getLayoutRefreshedListener, getLeft, getLocationOnScreen, getMarginBottom, getMarginLeft, getMarginRight, getMargins, getMarginsLeftAndRight, getMarginsTopAndBottom, getMarginTop, getMatrix, getMinHeight, getMinWidth, getMode, getModeResolved, getMouseEventListener, getMousePointerStyleListener, getName, getPadding, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getPivot, getPivotX, getPivotY, getResourceManager, getRight, getRotation, getRotationEventListener, getRotationSensitivity, getScale, getScaledListener, getScaleX, getScaleY, getScrollbarBackgroundColor, getScrollbarColor, getScrollbarFadingDelay, getScrollbarFadingDuration, getScrollBarMode, getScrollbarRadius, getScrollbarRoundRect, getScrollbarStartAngle, getScrollbarSweepAngle, getScrollbarThickness, getScrollState, getScrollValue, getSelfVisibleRect, getShadowColor, getSpeechEventListener, getTag, getTop, getTouchEventListener, getTransitionSymbol, getTranslation, getTranslationX, getTranslationY, getTranslationZ, getUserNextFocus, getVerticalPadding, getVerticalPosition, getVisibility, getVisibleRectOnScreen, getWidth, getWindowVisibleRect, hasFocus, hasFocusedEffect, hasOverlaps, hideFocusBorder, invalidate, isBoundaryFadeEffectEnable, isBoundToWindow, isClickable, isClipToContourEnabled, isComponentDisplayed, isEnabled, isFadeEffected, isFocusable, isFocused, isIdentityMatrix, isLongClickOn, isPressed, isRtl, isSaveStateEnabled, isScrollbarFadingOn, isScrollBarOn, isScrollbarOverlapEnabled, isSelected, isSoundEnable, isTouchFocusable, isVibrationEffectEnabled, notifyAccessibility, onAttributeConfigChanged, onRestoreState, onRtlChanged, onSaveState, performScale, playSound, postLayout, refreshContour, release, removeBindStateChangedListener, removeScrolledListener, requestFocus, requestForceForwardTouchEvent, restoreComponentTreeState, saveComponentTreeState, scrollBy, scrollTo, setAccessibility, setAccessibilityDescription, setAlpha, setAltitude, setBackground, setBindStateChangedListener, setBottom, setBoundaryFadeEffectEnable, setCanAcceptScrollListener, setCenterZoomFactor, setCentralScrollMode, setClickable, setClickedListener, setClipEnabled, setClipToContourEnabled, setComponentDescription, setComponentMinSize, setComponentPosition, setComponentPosition, setComponentSize, setComponentStateChangedListener, setContentEnable, setContentPosition, setContentPositionX, setContentPositionY, setContour, setContourRefreshedListener, setDoubleClickedListener, setDragAcceptAngle, setDraggedListener, setEditEventListener, setEnabled, setEstimatedSize, setEstimateSizeListener, setFadeEffectBoundaryWidth, setFadeEffectColor, setFocusable, setFocusBorderEnable, setFocusBorderPadding, setFocusBorderRadius, setFocusBorderRadius, setFocusBorderWidth, setFocusChangedListener, setFocusedEffect, setForeground, setForegroundGravity, setForwardHoverListener, setForwardTouchListener, setGesturePriority, setHeight, setHorizontalPadding, setHorizontalPosition, setHoverEventListener, setId, setKeyEventListener, setLayoutConfig, setLayoutDirection, setLayoutRefreshedListener, setLeft, setLongClickable, setLongClickedListener, setMarginBottom, setMarginLeft, setMarginRight, setMarginsLeftAndRight, setMarginsTopAndBottom, setMarginTop, setMinHeight, setMinWidth, setMode, setMouseEventListener, setMousePointerStyleListener, setName, setOnDragListener, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRelative, setPaddingRight, setPaddingTop, setPivot, setPivot, setPivotX, setPivotY, setPosition, setPositionX, setPositionY, setPressState, setRight, setRotation, setRotationEventListener, setRotationSensitivity, setScale, setScaledListener, setScaleX, setScaleY, setScrollbarBackgroundColor, setScrollbarColor, setScrollbarFadingDelay, setScrollbarFadingDuration, setScrollbarFadingEnabled, setScrollBarMode, setScrollbarOverlapEnabled, setScrollbarRadius, setScrollbarRoundRect, setScrollbarStartAngle, setScrollbarSweepAngle, setScrollbarThickness, setScrolledListener, setSelected, setShadowColor, setShadowStyle, setSoundEnable, setSpeechEventListener, setTag, setTop, setTouchEventListener, setTouchFocusable, setTransitionSymbol, setTranslation, setTranslationX, setTranslationY, setTranslationZ, setUnconsumedKeyEventListener, setUserNextFocus, setVerticalPadding, setVerticalPosition, setVibrationEffectEnabled, setVisibility, setWidth, showFocusBorder, simulateClick, simulateDrag, startDragAndDrop, subscribeVoiceEvents, unsubscribeVoiceEventsaddComponent, addComponent, addComponent, addComponent, addComponent, dispatchRestoreState, dispatchSaveState, findComponentById, findComponentHolderById, getAutoLayout, getChildCount, getChildIndex, getComponentAt, getComponentTransition, getFocusOrder, getLayoutManager, informConfigurationChanged, isClipToChildBoundsEnabled, isClipToPaddingBoundsEnabled, isTouchEventSplitable, moveChildToFront, onDrag, removeAllComponents, removeComponent, removeComponentAt, removeComponentById, removeComponents, setArrangeListener, setAutoLayout, setAutoLayout, setClipToChildBoundsEnabled, setClipToPaddingBoundsEnabled, setComponentTransition, setFocusOrder, setLayoutManager, setTouchEventSplitablegetComponentParent, postLayoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateLayoutConfig, verifyLayoutConfigpublic static final float ROTATION_SENSITIVITY_DEFAULT
TimePicker to respond to rotating crown events.
You can use Component.setRotationSensitivity(float) to set.public static final float ROTATION_SENSITIVITY_HIGH
TimePicker to respond to rotating crown events.
You can use Component.setRotationSensitivity(float) to set.public static final float ROTATION_SENSITIVITY_LOW
TimePicker to respond to rotating crown events.
You can use Component.setRotationSensitivity(float) to set.protected TimePicker.TimeChangedListener mTimeChangedListener
TimePicker.TimeChangedListener to listen for the change of the selected time.public TimePicker(Context context)
TimePicker instance by using the default attribute set and style.context - Indicates the application context.public TimePicker(Context context, AttrSet attrSet)
TimePicker instance by using specified attribute set and default style
after the XML file is parsed.context - Indicates the application context.attrSet - Indicates the attribute set to be used.public TimePicker(Context context, AttrSet attrSet, String styleName)
TimePicker instance by using specified attribute set and specified style
after the XML file is parsed.context - Indicates the application context.attrSet - Indicates the attribute set to be used.styleName - Indicates the style name to use.public boolean isHourEnabled()
true if the hour selector is enabled; returns false otherwise.public void enableHour(boolean enable)
enable - Specifies whether to enable the hour selector. The value true indicates that the
hour selector is enabled, and the value false indicates that the hour selector is disabled.public void showHour(boolean show)
show - Specifies whether to show the hour selector. The value true indicates that the hour
selector is shown, and the value false indicates that the hour selector is hidden.public boolean isHourShown()
true if the hour selector is shown; returns false otherwise.public boolean isMinuteEnabled()
true if the minute selector is enabled; returns false otherwise.public void enableMinute(boolean enable)
enable - Specifies whether to enable the minute selector. The value true indicates that the
minute selector is enabled, and the value false indicates that the minute selector is disabled.public void showMinute(boolean show)
show - Specifies whether to show the minute selector. The value true indicates that the
minute selector is shown, and the value false indicates that the minute selector is hidden.public boolean isMinuteShown()
true if the minute selector is shown; returns false otherwise.public boolean isSecondEnabled()
true if the second selector is enabled; returns false otherwise.public void enableSecond(boolean enable)
enable - Specifies whether to enable the second selector. The value true indicates that the
second selector is enabled, and the value false indicates that the second selector is disabled.public void showSecond(boolean show)
show - Specifies whether to show the second selector. The value true indicates that the
second selector is shown, and the value false indicates that the second selector is hidden.public boolean isSecondShown()
true if the second selector is shown; returns false otherwise.public int getHour()
public void setHour(int hour)
hour - Indicates the selected hour.IllegalArgumentException - Throws this exception if hour parameter is less than 0 or
bigger than 23.public int getMinute()
public void setMinute(int minute)
minute - Indicates the selected minute.IllegalArgumentException - Throws this exception if minute parameter is less than 0 or
bigger than 59.public int getSecond()
public void setSecond(int second)
second - Indicates the selected second.IllegalArgumentException - Throws this exception if second parameter is less than 0 or
bigger than 59.public void set24Hour(boolean is24Hour)
is24Hour - Specifies whether the time is displayed in 24-hour mode. The value true indicates
that the time is displayed in 24-hour mode, and the value false indicates that the time is not
displayed in the 24-hour mode.public boolean is24Hour()
true if the time is displayed in 24-hour mode; returns false otherwise.
The default value is true.public void setTimeChangedListener(TimePicker.TimeChangedListener listener)
TimePicker.TimeChangedListener to listen for the change of the selected time.listener - Indicates the listener to listen for the change of the selected time.public void setRange(int[] ranges)
ranges - Indicates the time range that can be selected.IllegalArgumentException - Throws this exception if the input parameter is invalid:
if ranges is null
or if ranges.length is not equal to 6
or if ranges[0] "starting hour" is less than 0 or bigger than 23
or if ranges[1] "starting minute" is less than 0 or bigger than 59
or if ranges[2] "starting second" is less than 0 or bigger than 59
or if ranges[3] "ending hour" is less than 0 or bigger than 23
or if ranges[4] "ending minute" is less than 0 or bigger than 59
or if ranges[5] "ending second" is less than 0 or bigger than 59.public void getRange(int[] ranges)
ranges - Indicates the time range that can be selected.IllegalArgumentException - Throws this exception if the input parameter is invalid.public void setNormalTextSize(int size)
size - Indicates the normal font size of the time displayed in the time picker.IllegalArgumentException - Throws this exception if the input parameter is invalid.getNormalTextSize(),
setSelectedTextSize(int),
getSelectedTextSize()public int getNormalTextSize()
setNormalTextSize(int),
setSelectedTextSize(int),
getSelectedTextSize()public void setSelectedTextSize(int size)
size - Indicates the selected font size of the time displayed in the time picker.IllegalArgumentException - Throws this exception if the input parameter is invalid.setNormalTextSize(int),
getNormalTextSize(),
getSelectedTextSize()public int getSelectedTextSize()
setNormalTextSize(int),
getNormalTextSize(),
setSelectedTextSize(int)public void setNormalTextColor(Color color)
color - Indicates the normal font color of the time displayed in the time picker.IllegalArgumentException - Throws this exception if color parameter is null.getNormalTextColor(),
setSelectedTextColor(Color),
getSelectedTextColor(),
setOperatedTextColor(Color),
getOperatedTextColor()public Color getNormalTextColor()
setNormalTextColor(Color),
setSelectedTextColor(Color),
getSelectedTextColor(),
setOperatedTextColor(Color),
getOperatedTextColor()public void setSelectedTextColor(Color color)
color - Indicates the selected font color of the time displayed in the time picker.IllegalArgumentException - Throws this exception if color parameter is null.setNormalTextColor(Color),
getNormalTextColor(),
getSelectedTextColor(),
setOperatedTextColor(Color),
getOperatedTextColor()public Color getSelectedTextColor()
setNormalTextColor(Color),
getNormalTextColor(),
setSelectedTextColor(Color),
setOperatedTextColor(Color),
getOperatedTextColor()public void setOperatedTextColor(Color color)
color - Indicates the color to set.IllegalArgumentException - Throws this exception if color parameter is null.setNormalTextColor(Color),
getNormalTextColor(),
setSelectedTextColor(Color),
getSelectedTextColor(),
getOperatedTextColor()public Color getOperatedTextColor()
setNormalTextColor(Color),
getNormalTextColor(),
setSelectedTextColor(Color),
getSelectedTextColor(),
setOperatedTextColor(Color)public void setNormalTextFont(Font font)
font - Indicates the font to set. For details about available values, see Font.IllegalArgumentException - Throws this exception if font parameter is null.public Font getNormalTextFont()
public void setSelectedTextFont(Font font)
font - Indicates the font to set. For details about available values, see Font.IllegalArgumentException - Throws this exception if font parameter is null.public Font getSelectedTextFont()
setSelectedTextFont(Font)public void setSelectedTextBackground(Element element)
Element as the background of the selected text in this time picker.element - Indicates the element to set.getSelectedTextBackgroundElement(),
setOperatedTextBackground(Element),
getOperatedTextBackgroundElement()public Element getSelectedTextBackgroundElement()
Element set as the background of the text selected in this time picker.Element.setSelectedTextBackground(Element),
setOperatedTextBackground(Element),
getOperatedTextBackgroundElement()public void setOperatedTextBackground(Element element)
Element as the text background of the selected item that is being operated.element - Indicates the element to set.setSelectedTextBackground(Element),
getSelectedTextBackgroundElement(),
getOperatedTextBackgroundElement()public Element getOperatedTextBackgroundElement()
Element set as the text background of the selected item that is being operated.Element.setSelectedTextBackground(Element),
getSelectedTextBackgroundElement(),
setOperatedTextBackground(Element)public void setSelectedNormalTextMarginRatio(float textMarginRatio)
textMarginRatio - Indicates the ratio to set.
The value must be greater than or equal to 0.0f.
The default value is 1.0f.IllegalArgumentException - Throws this exception if textMarginRatio parameter
is less than 0.getSelectedNormalTextMarginRatio()public float getSelectedNormalTextMarginRatio()
setSelectedNormalTextMarginRatio(float)public void setDisplayedLinesElements(Element top, Element bottom)
Element instance to draw the split line for selected text in the time picker.top - Indicates the Element instance to draw the split line on the top of the selected text.bottom - Indicates the Element instance to draw the split line at the bottom of the selected text.getDisplayedTopElement(),
getDisplayedBottomElement()public Element getDisplayedTopElement()
Element instance of the top split line in this time picker.Element instance.setDisplayedLinesElements(Element, Element)public Element getDisplayedBottomElement()
Element instance used to draw the split line at the bottom of a selected number in the
time picker.Element instance used to draw the split line at the bottom of the selected number.setDisplayedLinesElements(Element, Element)public Element[] getDisplayedLinesElements()
Element instances used to draw split lines.public void setDisplayedTopElement(Element top)
top - Indicates the top split line to set.getDisplayedTopElement()public void setDisplayedBottomElement(Element bottom)
bottom - Indicates the bottom split line to set.getDisplayedBottomElement()public void setAmPmStrings(String am, String pm)
am - Indicates the character string representing a.m..pm - Indicates the character string representing p.m..public void setAmString(String am)
am - Indicates the string representing a.m.public void setPmString(String pm)
pm - Indicates the string representing p.m.public String[] getAmPmStrings()
public String getAmString()
public String getPmString()
public TimePicker.TimeChangedListener getTimeChangedListener()
public void setWheelModeEnabled(boolean isEnabled)
isEnabled - Indicates whether to enable wheel mode. true indicates to enable the
wheel mode; false indicates otherwise.public boolean isWheelModeEnabled()
true if wheel mode is enabled; returns false otherwise.public void setShaderColor(Color color)
color - Indicates the shader color.IllegalArgumentException - Throws this exception if color parameter is null.getShaderColor()public Color getShaderColor()
setShaderColor(Color)public void setSelectorItemNum(int itemNum)
itemNum - Indicates the number of items to display on the selector. The value must be greater than 0.IllegalArgumentException - Throws this exception if the number of items to display on the selector
is less than or equal to 0.getSelectorItemNum()public int getSelectorItemNum()
0 if
the number is not specified.setSelectorItemNum(int)public void setAmPmOrder(TimePicker.AmPmOrder order)
The column representing a.m. and p.m. can be displayed at the start or in the end of the picker by specifying
the value AmPmOrder#START or AmPmOrder#END.
The direction (left-to-right or right-to-left) of AmPmOrder#START and AmPmOrder#END depends on
specified Component.isRtl() value.
The column can also be displayed on the left or right of the time picker by specifying AmPmOrder#LEFT
or AmPmOrder#RIGHT.
order - Indicates the AmPmOrder enumeration value, which can be AmPmOrder#START,
AmPmOrder#END, AmPmOrder#LEFT, or AmPmOrder#RIGHT.IllegalArgumentException - Throws this exception if order parameter is null.TimePicker.AmPmOrder,
getAmPmOrder(),
set24Hour(boolean),
setAmPmStrings(String, String)public TimePicker.AmPmOrder getAmPmOrder()
The column representing a.m. and p.m. can be displayed at the start or in the end of the picker by specifying
the value AmPmOrder#START or AmPmOrder#END.The direction (left-to-right or right-to-left)
of AmPmOrder#START and AmPmOrder#END depends on the specified Component.isRtl() value.
AmPmOrder enumeration value, which can be AmPmOrder#START,
AmPmOrder#END, AmPmOrder#LEFT, or AmPmOrder#RIGHT.TimePicker.AmPmOrder,
setAmPmOrder(AmPmOrder),
set24Hour(boolean),
setAmPmStrings(String, String)