ComponentParentpublic class DatePicker extends StackLayout
This method allows users to select a date using the year, month, and day columns.
If only the year or month are required, or if the sequence of year, month, and day needs to the customized, use
DateOrder.
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static interface |
DatePicker.DateOrder |
Defines the display format of
DatePicker components. |
static interface |
DatePicker.ValueChangedListener |
Provides a date changed 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| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static float |
ROTATION_SENSITIVITY_DEFAULT |
Indicates the default rotation sensitivity of
DatePicker to respond to rotating crown events. |
static float |
ROTATION_SENSITIVITY_HIGH |
Indicates the high rotation sensitivity of
DatePicker to respond to rotating crown events. |
static float |
ROTATION_SENSITIVITY_LOW |
Indicates the low rotation sensitivity of
DatePicker 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| 构造器 | 说明 |
|---|---|
DatePicker(Context context) |
Default constructor used to create a
DatePicker instance by using the default attribute set and style. |
DatePicker(Context context,
AttrSet attrSet) |
A constructor used to create a
DatePicker instance by using specified attribute set and default
style after the XML file is parsed. |
DatePicker(Context context,
AttrSet attrSet,
String styleName) |
A constructor used to create a
DatePicker instance by using specified attribute set and specified
style after the XML file is parsed. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getDateOrder() |
Obtains the date format.
|
int |
getDayOfMonth() |
Obtains the day set in the date picker.
|
Element |
getDisplayedBottomElement() |
Obtains the
Element instance used to draw a split line at the bottom of the selected number in a date
picker. |
Element |
getDisplayedTopElement() |
Obtains the
Element instance used to draw a split line on the top of a selected number in the date
picker. |
long |
getMaxDate() |
Obtains the maximal date supported by the date picker.
|
long |
getMinDate() |
Obtains the minimal date supported by the date picker.
|
int |
getMonth() |
Obtains the month set in the date picker.
|
Color |
getNormalTextColor() |
Obtains the color of the normal text in the date picker.
|
Font |
getNormalTextFont() |
Obtains the font of the normal text.
|
int |
getNormalTextSize() |
Obtains the size of the normal text in the date 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 date picker.
|
float |
getSelectedNormalTextMarginRatio() |
Obtains the ratio of the selected to normal text margin in this date picker.
|
Element |
getSelectedTextBackgroundElement() |
Obtains the
Element set as the background of the text selected by the date picker. |
Color |
getSelectedTextColor() |
Obtains the color of the selected text in the date picker.
|
Font |
getSelectedTextFont() |
Obtains the font of the selected text.
|
int |
getSelectedTextSize() |
Obtains the size of the selected text in the date picker.
|
int |
getSelectorItemNum() |
Obtains the number of all items in a selector.
|
Color |
getShaderColor() |
Obtains the shader color of a date picker.
|
DatePicker.ValueChangedListener |
getValueChangedListener() |
Obtains the listener set by
setValueChangedListener for monitoring data updates. |
int |
getYear() |
Obtains the year set in the date picker.
|
void |
init(int year,
int monthOfYear,
int dayOfMonth,
DatePicker.ValueChangedListener valueChangedListener) |
Initializes the date picker.
|
boolean |
isDayFixed() |
Obtains the day selector state.
|
boolean |
isMonthFixed() |
Obtains the month selector state.
|
boolean |
isWheelModeEnabled() |
Obtains whether to enable the wheel mode of a date picker to allow the maximum value on the selector
to wrap around the minimum value.
|
boolean |
isYearFixed() |
Obtains the year selector state.
|
void |
setDateOrder(int dateOrder) |
Sets the date format.
|
void |
setDayFixed(boolean fixed) |
Sets whether to disable the day selector.
|
void |
setDisplayedLinesElements(Element top,
Element bottom) |
Sets a
Element instance used to draw a split line for the selected text in a date picker. |
void |
setMaxDate(long maxDate) |
Sets the maximal date supported by the date picker.
|
void |
setMinDate(long minDate) |
Sets the minimal date supported by the date picker.
|
void |
setMonthFixed(boolean fixed) |
Sets whether to disable the month selector.
|
void |
setNormalTextColor(Color color) |
Sets the color of the normal text in a date picker.
|
void |
setNormalTextFont(Font font) |
Sets the font for the normal text.
|
void |
setNormalTextSize(int size) |
Sets the size of the normal text in a date 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 date picker.
|
void |
setSelectedNormalTextMarginRatio(float textMarginRatio) |
Sets the ratio of the selected to normal text margin in this date picker.
|
void |
setSelectedTextBackground(Element element) |
Sets the specified
Element as the background of the text selected by the date picker. |
void |
setSelectedTextColor(Color color) |
Sets the color of the selected text in a date picker.
|
void |
setSelectedTextFont(Font font) |
Sets the font for the selected text.
|
void |
setSelectedTextSize(int size) |
Sets the size of the selected text in the date 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 date picker.
|
void |
setValueChangedListener(DatePicker.ValueChangedListener valueChangedListener) |
Sets a date change listener.
|
void |
setWheelModeEnabled(boolean isEnabled) |
Sets whether to enable the wheel mode of a date picker to allow the maximum value on the selector to
wrap around the minimum value.
|
void |
setYearFixed(boolean fixed) |
Sets whether to disable the year selector.
|
void |
updateDate(int year,
int month,
int dayOfMonth) |
Updates the current date.
|
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
DatePicker to respond to rotating crown events.
You can use Component.setRotationSensitivity(float) to set.public static final float ROTATION_SENSITIVITY_HIGH
DatePicker to respond to rotating crown events.
You can use Component.setRotationSensitivity(float) to set.public static final float ROTATION_SENSITIVITY_LOW
DatePicker to respond to rotating crown events.
You can use Component.setRotationSensitivity(float) to set.public DatePicker(Context context)
DatePicker instance by using the default attribute set and style.context - Indicates the application context.public DatePicker(Context context, AttrSet attrSet)
DatePicker 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 DatePicker(Context context, AttrSet attrSet, String styleName)
DatePicker 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 int getYear()
This method displays year in the form of digits, for example, 2019.
public int getMonth()
This method displays month in the form of digits, for example, 5, which indicates May.
public int getDayOfMonth()
This method displays day in the form of digits, for example, 25, which indicates the 25th day in a month.
public long getMaxDate()
The maximal date is displayed in digits, in unit of seconds elapsed since the Unix epoch. The default maximal date is the seconds corresponding to 2038-01-19 03:14:07.
public long getMinDate()
The minimal date is displayed in digits, in unit of seconds elapsed since the Unix epoch. The default minimal date is the seconds corresponding to 2007-11-05 00:00:00.
public void setMaxDate(long maxDate)
maxDate - Indicates the maximal date supported by the date picker, in unit of seconds elapsed since
the Unix epoch.public void setMinDate(long minDate)
minDate - Indicates the minimal date supported by the date picker, in unit of seconds elapsed since
the Unix epoch.public void updateDate(int year,
int month,
int dayOfMonth)
This method updates the year, month, and day in the date picker.
year - Indicates the year, which cannot be less than 0.month - Indicates the month, which ranges from 1 to 12.dayOfMonth - Indicates the day of the month. The value cannot be less than 1. If the value is greater
than the maximum day of a month, the maximum day is used.IllegalArgumentException - Throws this exception if year is less than 0, month is less
than 1, or dayOfMonth is less than 1.public void setValueChangedListener(DatePicker.ValueChangedListener valueChangedListener)
This method sets the ValueChangedListener to monitor date change events.
These events can be proceed by calling the ValueChangedListener#onValueChanged method.
The listener notifies the application of change events of a date picker.
valueChangedListener - Indicates the date change listener, which is used to process date change events.public DatePicker.ValueChangedListener getValueChangedListener()
setValueChangedListener for monitoring data updates.public void setDateOrder(int dateOrder)
Multiple styles are supported, for example, year-month-day and month-day-year. For details about the supported
date formats, see DateOrder.
dateOrder - Indicates the date format. For details about parameter value range, see DateOrder.IllegalArgumentException - Throws this exception if the DateOrder interface doesn't contain this
value.public int getDateOrder()
This method obtains the display format of date, for example, year-month-day and month-day-year. For details
about the supported date formats, see DateOrder.
DateOrder.public void setNormalTextSize(int size)
size - Indicates the size of the normal text in the date picker.IllegalArgumentException - Throws this exception if the parameter value isn't positive.getNormalTextSize(),
setSelectedTextSize(int),
getSelectedTextSize()public int getNormalTextSize()
setNormalTextSize(int),
setSelectedTextSize(int),
getSelectedTextSize()public void setSelectedTextSize(int size)
size - Indicates the size of the selected text in the date picker.IllegalArgumentException - Throws this exception if the parameter value isn't positive.setNormalTextSize(int),
getNormalTextSize(),
getSelectedTextSize()public int getSelectedTextSize()
setNormalTextSize(int),
getNormalTextSize(),
setSelectedTextSize(int)public void init(int year,
int monthOfYear,
int dayOfMonth,
DatePicker.ValueChangedListener valueChangedListener)
This method initializes the date picker, including updating the year, month, and day, and setting the date change listener.
year - Indicates the initial year.monthOfYear - Indicates the initial month, which ranges from 1 to 12.dayOfMonth - Indicates the day in the month.valueChangedListener - Indicates the date change listener, which can be null.IllegalArgumentException - Throws this exception if year is less than 0, month is less
than 1, or dayOfMonth is less than 1.public void setYearFixed(boolean fixed)
This method can set the year selector to a fixed state to disable it.
fixed - Indicates the year selector state. true means to disable the year selector; false
means to enable the year selector.public boolean isYearFixed()
true if the selector is disabled; returns false otherwise.public void setMonthFixed(boolean fixed)
This method can set the month selector to a fixed state to disable it.
fixed - Indicates the month selector state. true means to disable the month selector;
false means to enable the month selector.public boolean isMonthFixed()
true if the month selector is disabled; returns false otherwise.public void setDayFixed(boolean fixed)
This method can set the day selector to a fixed state to disable it.
fixed - Indicates the day selector state. true means to disable the day selector; false
means to enable the day selector.public boolean isDayFixed()
true if the day selector is disabled; returns false otherwise.public void setNormalTextColor(Color color)
color - Indicates the color of the normal text in the date picker.IllegalArgumentException - Throws this exception if the parameter value is null.getNormalTextColor(),
setSelectedTextColor(Color),
getSelectedTextColor()public Color getNormalTextColor()
getNormalTextColor(),
setSelectedTextColor(Color),
getSelectedTextColor()public void setSelectedTextColor(Color color)
color - Indicates the color of the selected text in the date picker.IllegalArgumentException - Throws this exception if the parameter value is null.setNormalTextColor(Color),
getNormalTextColor(),
getSelectedTextColor()public Color getSelectedTextColor()
setNormalTextColor(Color),
getNormalTextColor(),
setSelectedTextColor(Color)public void setOperatedTextColor(Color color)
color - Indicates the color to set.IllegalArgumentException - Throws this exception if the parameter value 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, as defined in Font.public Font getNormalTextFont()
public void setSelectedTextFont(Font font)
font - Indicates the font to set, as defined in Font.public Font getSelectedTextFont()
setSelectedTextFont(Font)public void setSelectedTextBackground(Element element)
Element as the background of the text selected by the date picker.element - Indicates the specified element to set.getSelectedTextBackgroundElement(),
setOperatedTextBackground(Element),
getOperatedTextBackgroundElement()public Element getSelectedTextBackgroundElement()
Element set as the background of the text selected by the date 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 specified 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 the parameter value is less than 0.0f.getSelectedNormalTextMarginRatio()public float getSelectedNormalTextMarginRatio()
setSelectedNormalTextMarginRatio(float)public void setDisplayedLinesElements(Element top, Element bottom)
Element instance used to draw a split line for the selected text in a date picker.top - Indicates the Element instance used to draw a split line on the top of the selected text.bottom - Indicates the Element instance used to draw a split line at the bottom of the selected
text.getDisplayedTopElement(),
getDisplayedBottomElement()public Element getDisplayedTopElement()
Element instance used to draw a split line on the top of a selected number in the date
picker.Element instance used to draw a split line on the top of the selected number.setDisplayedLinesElements(Element, Element)public Element getDisplayedBottomElement()
Element instance used to draw a split line at the bottom of the selected number in a date
picker.Element instance used to draw a split line at the bottom of the selected number.setDisplayedLinesElements(Element, Element)public void setWheelModeEnabled(boolean isEnabled)
isEnabled - Specifies whether to enable the wheel mode; true indicates to enable the
wheel mode; false indicates to disable the wheel mode.public boolean isWheelModeEnabled()
true if the wheel mode is enabled; returns false otherwise.public void setSelectorItemNum(int itemNum)
itemNum - Indicates the number of all items to display on the selector.IllegalArgumentException - Throws this exception if the number of items to display on the selector
is less than or equal to 0.public int getSelectorItemNum()
0.public void setShaderColor(Color color)
color - Indicates the shader color to set.IllegalArgumentException - Throws this exception if the parameter value is null.getShaderColor()public Color getShaderColor()
setShaderColor(Color)