public class WheelDatePicker extends android.widget.LinearLayout implements WheelPicker.OnItemSelectedListener, IDebug, IWheelPicker, IWheelDatePicker, IWheelYearPicker, IWheelMonthPicker, IWheelDayPicker
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
WheelDatePicker.OnDateSelectedListener |
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListenerandroid.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListenerHORIZONTAL, SHOW_DIVIDER_BEGINNING, SHOW_DIVIDER_END, SHOW_DIVIDER_MIDDLE, SHOW_DIVIDER_NONE, VERTICALCLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHEACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z| 构造器和说明 |
|---|
WheelDatePicker(android.content.Context context) |
WheelDatePicker(android.content.Context context,
android.util.AttributeSet attrs) |
| 限定符和类型 | 方法和说明 |
|---|---|
Date |
getCurrentDate() |
int |
getCurrentDay()
获取当前选择的日期
|
int |
getCurrentItemPosition()
已过时。
|
int |
getCurrentMonth()
获取当前选择的月份
|
int |
getCurrentYear()
获取当前选中的年份
|
int |
getCurtainColor()
获取滚轮选择器幕布颜色
Get color of curtain
For example 0xFF123456
|
List |
getData()
已过时。
|
int |
getIndicatorColor()
获取滚轮选择器指示器颜色
Get color of indicator
For example 0xFF123456
|
int |
getIndicatorSize()
获取滚轮选择器指示器尺寸
Get size of indicator
Unit in px
|
int |
getItemAlign()
已过时。
|
int |
getItemAlignDay() |
int |
getItemAlignMonth() |
int |
getItemAlignYear() |
int |
getItemSpace()
获取滚轮选择器数据项之间间距
Get space between items
Unit in px
|
int |
getItemTextColor()
获取数据项文本颜色
Get text color of items
For example 0xFF123456
|
int |
getItemTextSize()
获取数据项文本尺寸大小
Get text size of items
Unit in px
|
String |
getMaximumWidthText()
已过时。
|
int |
getMaximumWidthTextPosition()
已过时。
|
int |
getMonth()
获取月份
|
int |
getSelectedDay()
获取日期选择器初始化时选择的日期
|
int |
getSelectedItemPosition()
已过时。
|
int |
getSelectedItemTextColor()
获取当前选中的数据项文本颜色
Get text color of current selected item
For example 0xFF123456
|
int |
getSelectedMonth()
获取月份选择器初始化时选择的月份
|
int |
getSelectedYear()
获取年份选择器初始化时选中的年份
|
android.widget.TextView |
getTextViewDay() |
android.widget.TextView |
getTextViewMonth() |
android.widget.TextView |
getTextViewYear() |
android.graphics.Typeface |
getTypeface()
获取数据项文本字体对象
Get typeface of item text
|
int |
getVisibleItemCount()
获取滚轮选择器可见数据项的数量
Get the count of current visible items in WheelPicker
|
WheelDayPicker |
getWheelDayPicker() |
WheelMonthPicker |
getWheelMonthPicker() |
WheelYearPicker |
getWheelYearPicker() |
int |
getYear()
获取年份
|
int |
getYearEnd()
获取结束的年份
|
int |
getYearStart()
获取开始的年份
|
boolean |
hasAtmospheric()
滚轮选择器是否有空气感
Whether WheelPicker has atmospheric or not
|
boolean |
hasCurtain()
滚轮选择器是否显示幕布
Whether WheelPicker display curtain or not
|
boolean |
hasIndicator()
滚轮选择器是否有指示器
Whether WheelPicker display indicator or not
|
boolean |
hasSameWidth()
已过时。
|
boolean |
isCurved()
滚轮选择器是否开启卷曲效果
Whether WheelPicker enable curved effect or not
|
boolean |
isCyclic()
滚轮选择器数据项是否为循环状态
Whether WheelPicker is cyclic or not
|
void |
onItemSelected(WheelPicker picker,
Object data,
int position)
当滚轮选择器数据项被选中时回调该方法
滚动选择器滚动停止后会回调该方法并将当前选中的数据和数据在数据列表中对应的位置返回
|
void |
setAtmospheric(boolean hasAtmospheric)
设置滚轮选择器是否有空气感
开启空气感的滚轮选择器将呈现中间不透明逐渐向两端透明过度的渐变效果
Set whether WheelPicker has atmospheric or not
WheelPicker's items will be transparent from center to ends if atmospheric display
|
void |
setCurtain(boolean hasCurtain)
设置滚轮选择器是否显示幕布
设置滚轮选择器显示幕布的话将会在当前选中的项上方绘制一个与当前数据项大小一致的矩形区域并填充指定颜色
Set whether WheelPicker display curtain or not
WheelPicker will draw a rectangle as big as current selected item and fill specify color
above content if curtain display
|
void |
setCurtainColor(int color)
设置滚轮选择器幕布颜色
Set color of curtain
For example 0xFF123456
|
void |
setCurved(boolean isCurved)
设置滚轮选择器是否开启卷曲效果
开启滚轮选择器的滚轮效果会呈现一种滚轮两端向屏幕内弯曲的效果
滚轮选择器的卷曲效果依赖于严格的几何模型,一些与尺寸相关的设置在该效果下可能会变得不再有效,例如在卷
曲效果下每一条数据项的尺寸大小因为透视关系看起来都不再一样,数据项之间的间隔也会因为卷曲的关系有微妙
的视觉差距
Set whether WheelPicker enable curved effect or not
If setCurved true, WheelPicker will display with curved effect looks like ends bend into
screen with perspective.
|
void |
setCyclic(boolean isCyclic)
设置滚轮选择器数据项是否为循环状态
开启数据循环会使滚轮选择器上下滚动不再有边界,会呈现数据首尾相接无限循环的效果
Set whether WheelPicker is cyclic or not
WheelPicker's items will be end to end and in an infinite loop if setCyclic true, and there
is no border whit scroll when WheelPicker in cyclic state
|
void |
setData(List data)
已过时。
|
void |
setDebug(boolean isDebug)
设置调试模式
开启调试模式有可能在一定程度上降低代码执行效率,请务必在正式发布时关闭调试模式
|
void |
setIndicator(boolean hasIndicator)
设置滚轮选择器是否显示指示器
如果设置滚轮选择器显示指示器,那么将会在滚轮选择器的当前选中数据项上下显示两根分割线
需要注意的是指示器的尺寸并不参与滚轮选择器的尺寸计算,其会绘制在滚轮选择器的上方
Set whether WheelPicker display indicator or not
WheelPicker will draw two lines above an below current selected item if display indicator
Notice:Indicator's size will not participate in WheelPicker's size calculation, it will drawn
above the content
|
void |
setIndicatorColor(int color)
设置滚轮选择器指示器颜色
Set color of indicator
For example 0xFF123456
|
void |
setIndicatorSize(int size)
设置滚轮选择器指示器尺寸
Set size of indicator
Unit in px
|
void |
setItemAlign(int align)
已过时。
|
void |
setItemAlignDay(int align) |
void |
setItemAlignMonth(int align) |
void |
setItemAlignYear(int align) |
void |
setItemSpace(int space)
设置滚轮选择器数据项之间间距
Set space between items
Unit in px
|
void |
setItemTextColor(int color)
设置数据项文本颜色
Set text color of items
For example 0xFF123456
|
void |
setItemTextSize(int size)
设置数据项文本尺寸大小
Set text size of items
Unit in px
|
void |
setMaximumWidthText(String text)
已过时。
|
void |
setMaximumWidthTextPosition(int position)
已过时。
|
void |
setMonth(int month)
设置月份
|
void |
setOnDateSelectedListener(WheelDatePicker.OnDateSelectedListener listener) |
void |
setOnItemSelectedListener(WheelPicker.OnItemSelectedListener listener)
已过时。
|
void |
setOnWheelChangeListener(WheelPicker.OnWheelChangeListener listener)
已过时。
|
void |
setSameWidth(boolean hasSameSize)
已过时。
|
void |
setSelectedDay(int day)
设置日期选择器初始化时选择的日期
|
void |
setSelectedItemPosition(int position)
已过时。
|
void |
setSelectedItemTextColor(int color)
设置当前选中的数据项文本颜色
Set text color of current selected item
For example 0xFF123456
|
void |
setSelectedMonth(int month)
设置月份选择器初始化时选择的月份
|
void |
setSelectedYear(int year)
设置年份选择器初始化时选中的年份
|
void |
setTypeface(android.graphics.Typeface tf)
设置数据项文本字体对象
数据项文本字体的设置可能会导致滚轮大小的改变
Set typeface of item text
Set typeface of item text maybe cause WheelPicker size change
|
void |
setVisibleItemCount(int count)
设置滚轮选择器可见数据项数量
滚轮选择器的可见数据项数量必须为大于1的整数
这里需要注意的是,滚轮选择器会始终显示奇数个数据项,即便你为其设置偶数个数据项,最终也会被转换为奇数
默认情况下滚轮选择器可见数据项数量为7
Set the count of current visible items in WheelPicker
The count of current visible items in WheelPicker must greater than 1
Notice:count of current visible items in WheelPicker will always is an odd number, even you
can set an even number for it, it will be change to an odd number eventually
By default, the count of current visible items in WheelPicker is 7
|
void |
setYear(int year)
设置年份
|
void |
setYearAndMonth(int year,
int month)
设置年份和月份
|
void |
setYearEnd(int end)
设置结束的年份
|
void |
setYearFrame(int start,
int end)
设置年份范围
|
void |
setYearStart(int start)
设置开始的年份
|
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getBaseline, getBaselineAlignedChildIndex, getDividerDrawable, getDividerPadding, getOrientation, getShowDividers, getWeightSum, isBaselineAligned, isMeasureWithLargestChildEnabled, onDraw, onLayout, onMeasure, onRtlPropertiesChanged, setBaselineAligned, setBaselineAlignedChildIndex, setDividerDrawable, setDividerPadding, setGravity, setHorizontalGravity, setMeasureWithLargestChildEnabled, setOrientation, setShowDividers, setVerticalGravity, setWeightSum, shouldDelayChildPressedStateaddChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAttachedToWindow, onCreateDrawableState, onDetachedFromWindow, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayoutaddFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDrawclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayoutpublic WheelDatePicker(android.content.Context context)
public WheelDatePicker(android.content.Context context,
android.util.AttributeSet attrs)
public void onItemSelected(WheelPicker picker, Object data, int position)
WheelPicker.OnItemSelectedListeneronItemSelected 在接口中 WheelPicker.OnItemSelectedListenerpicker - 滚轮选择器data - 当前选中的数据position - 当前选中的数据在数据列表中的位置public void setDebug(boolean isDebug)
IDebugpublic int getVisibleItemCount()
IWheelPickerGet the count of current visible items in WheelPicker
getVisibleItemCount 在接口中 IWheelPickerpublic void setVisibleItemCount(int count)
IWheelPickerSet the count of current visible items in WheelPicker The count of current visible items in WheelPicker must greater than 1 Notice:count of current visible items in WheelPicker will always is an odd number, even you can set an even number for it, it will be change to an odd number eventually By default, the count of current visible items in WheelPicker is 7
setVisibleItemCount 在接口中 IWheelPickercount - 滚轮选择器可见数据项数量public boolean isCyclic()
IWheelPickerWhether WheelPicker is cyclic or not
isCyclic 在接口中 IWheelPickerpublic void setCyclic(boolean isCyclic)
IWheelPickerSet whether WheelPicker is cyclic or not WheelPicker's items will be end to end and in an infinite loop if setCyclic true, and there is no border whit scroll when WheelPicker in cyclic state
setCyclic 在接口中 IWheelPickerisCyclic - 是否为循环状态@Deprecated public void setOnItemSelectedListener(WheelPicker.OnItemSelectedListener listener)
IWheelPickersetOnItemSelectedListener 在接口中 IWheelPickerlistener - 滚轮Item选中监听器WheelPicker.OnItemSelectedListener@Deprecated public int getSelectedItemPosition()
IWheelPickerIWheelPicker.setSelectedItemPosition(int)所设置的值,当且仅当调用
IWheelPicker.setSelectedItemPosition(int)设置新值后,该方法所返回的值才会改变
如果你只是想获取滚轮静止时当前被选中的数据项所显示的数据在数据源中的位置,你可以通过
WheelPicker.OnItemSelectedListener回调监听或调用
IWheelPicker.getCurrentItemPosition()
Get the position of current selected item in data source
Notice:The value by return will not change when WheelPicker scroll, this method will always
return the value which IWheelPicker.setSelectedItemPosition(int) set, the value this method
return will be changed if and only if call the
IWheelPicker.setSelectedItemPosition(int)
set a new value
If you only want to get the position of current selected item in data source, you can get it
through WheelPicker.OnItemSelectedListener or call
IWheelPicker.getCurrentItemPosition() directly
getSelectedItemPosition 在接口中 IWheelPicker@Deprecated public void setSelectedItemPosition(int position)
IWheelPickerWheelPicker.OnWheelChangeListener和
WheelPicker.OnItemSelectedListener监听器中方法参数的值,因
此你总该在调用该方法后考虑到相关影响
你总该为该方法传入一个大于等于0小于数据源IWheelPicker.getData()长度
的值,否则会抛出异常
默认情况下,当前被选中的数据项所显示的数据在数据源中的位置为0
Set the position of current selected item in data source
Call this method and set a new value may be reinitialize the location of WheelPicker. For
example, you call this method after scroll the WheelPicker and set selected item position
with a new value, WheelPicker will clear the related parameters last scroll set and reset
series of data, and make the position 3 as a new starting point of WheelPicker, this behavior
maybe influenced some attribute you set last time, such as parameters of method in
WheelPicker.OnWheelChangeListener and
WheelPicker.OnItemSelectedListener, so you must always
consider the influence when you call this method set a new value
You should always set a value which greater than or equal to 0 and less than data source's
length
By default, position of current selected item in data source is 0
setSelectedItemPosition 在接口中 IWheelPickerposition - 当前被选中的数据项所显示的数据在数据源中的位置@Deprecated public int getCurrentItemPosition()
IWheelPickerIWheelPicker.getSelectedItemPosition()不同的是,该方法所返回的结果会因为滚轮选择器的改变而改变
Get the position of current selected item in data source
The difference between IWheelPicker.getSelectedItemPosition(), the value this method return will
change by WheelPicker scrolled
getCurrentItemPosition 在接口中 IWheelPicker@Deprecated public List getData()
IWheelPickerGet data source of WheelPicker
getData 在接口中 IWheelPicker@Deprecated public void setData(List data)
IWheelPickerIWheelPicker.setSelectedItemPosition(int)
Set data source of WheelPicker
The data source can be any type, WheelPicker will change the data to string when it draw the
item.
There is a default data source when you not set the data source for WheelPicker.
Set data source for WheelPicker will reset state of it, you can refer to
IWheelPicker.setSelectedItemPosition(int) for more details.
setData 在接口中 IWheelPickerdata - 数据列表@Deprecated public void setSameWidth(boolean hasSameSize)
IWheelPickerIWheelPicker.setMaximumWidthTextPosition(int)方法告诉滚轮选择器最宽的这条数据文本在数据
源的什么位置,滚轮选择器则会根据该位置找到该条数据文本并将其宽度作为滚轮选择器的宽度。如果你不知道位
置,但是知道最宽的数据文本,那么你也可以直接通过调用IWheelPicker.setMaximumWidthText(String)告诉滚轮选
择器最宽的文本是什么,滚轮选择器会根据这条文本计算宽度并将其作为滚轮选择器的宽度
Set items of WheelPicker if has same width
WheelPicker will traverse the data source to calculate each data text width to find out the
maximum text width for the final view width, this process maybe spends a lot of time and
reduce efficiency when data source has large amount data, in most large amount data case,
data text always has same width, you can call this method tell to WheelPicker your data
source has same width to save time and improve efficiency.
Sometimes the data source you set is positively has different text width, but maybe you know
the maximum width text's position in data source, then you can call
IWheelPicker.setMaximumWidthTextPosition(int) tell to WheelPicker where is the maximum width text
in data source, WheelPicker will calculate its width base on this text which found by
position. If you don't know the position of maximum width text in data source, but you have
maximum width text, you can call IWheelPicker.setMaximumWidthText(String) tell to WheelPicker
what maximum width text is directly, WheelPicker will calculate its width base on this text.
setSameWidth 在接口中 IWheelPickerhasSameSize - 是否有相同的宽度@Deprecated public boolean hasSameWidth()
IWheelPickerWhether items has same width or not
hasSameWidth 在接口中 IWheelPicker@Deprecated public void setOnWheelChangeListener(WheelPicker.OnWheelChangeListener listener)
IWheelPickersetOnWheelChangeListener 在接口中 IWheelPickerlistener - 滚轮滚动状态改变监听器WheelPicker.OnWheelChangeListener@Deprecated public String getMaximumWidthText()
IWheelPickerGet maximum width text
getMaximumWidthText 在接口中 IWheelPicker@Deprecated public void setMaximumWidthText(String text)
IWheelPickerSet maximum width text
setMaximumWidthText 在接口中 IWheelPickertext - 最宽的文本IWheelPicker.setSameWidth(boolean)@Deprecated public int getMaximumWidthTextPosition()
IWheelPickerGet the position of maximum width text in data source
getMaximumWidthTextPosition 在接口中 IWheelPicker@Deprecated public void setMaximumWidthTextPosition(int position)
IWheelPickerSet the position of maximum width text in data source
setMaximumWidthTextPosition 在接口中 IWheelPickerposition - 最宽的文本在数据源中的位置IWheelPicker.setSameWidth(boolean)public int getSelectedItemTextColor()
IWheelPickerGet text color of current selected item For example 0xFF123456
getSelectedItemTextColor 在接口中 IWheelPickerpublic void setSelectedItemTextColor(int color)
IWheelPickerSet text color of current selected item For example 0xFF123456
setSelectedItemTextColor 在接口中 IWheelPickercolor - 当前选中的数据项文本颜色,16位颜色值public int getItemTextColor()
IWheelPickerGet text color of items For example 0xFF123456
getItemTextColor 在接口中 IWheelPickerpublic void setItemTextColor(int color)
IWheelPickerSet text color of items For example 0xFF123456
setItemTextColor 在接口中 IWheelPickercolor - 数据项文本颜色,16位颜色值public int getItemTextSize()
IWheelPickerGet text size of items Unit in px
getItemTextSize 在接口中 IWheelPickerpublic void setItemTextSize(int size)
IWheelPickerSet text size of items Unit in px
setItemTextSize 在接口中 IWheelPickersize - 设置数据项文本尺寸大小,单位:pxpublic int getItemSpace()
IWheelPickerGet space between items Unit in px
getItemSpace 在接口中 IWheelPickerpublic void setItemSpace(int space)
IWheelPickerSet space between items Unit in px
setItemSpace 在接口中 IWheelPickerspace - 滚轮选择器数据项之间间距,单位:pxpublic void setIndicator(boolean hasIndicator)
IWheelPickerSet whether WheelPicker display indicator or not WheelPicker will draw two lines above an below current selected item if display indicator Notice:Indicator's size will not participate in WheelPicker's size calculation, it will drawn above the content
setIndicator 在接口中 IWheelPickerhasIndicator - 是否有指示器public boolean hasIndicator()
IWheelPickerWhether WheelPicker display indicator or not
hasIndicator 在接口中 IWheelPickerpublic int getIndicatorSize()
IWheelPickerGet size of indicator Unit in px
getIndicatorSize 在接口中 IWheelPickerpublic void setIndicatorSize(int size)
IWheelPickerSet size of indicator Unit in px
setIndicatorSize 在接口中 IWheelPickersize - 滚轮选择器指示器尺寸,单位:pxpublic int getIndicatorColor()
IWheelPickerGet color of indicator For example 0xFF123456
getIndicatorColor 在接口中 IWheelPickerpublic void setIndicatorColor(int color)
IWheelPickerSet color of indicator For example 0xFF123456
setIndicatorColor 在接口中 IWheelPickercolor - 滚轮选择器指示器颜色,16位颜色值public void setCurtain(boolean hasCurtain)
IWheelPickerSet whether WheelPicker display curtain or not WheelPicker will draw a rectangle as big as current selected item and fill specify color above content if curtain display
setCurtain 在接口中 IWheelPickerhasCurtain - 滚轮选择器是否显示幕布public boolean hasCurtain()
IWheelPickerWhether WheelPicker display curtain or not
hasCurtain 在接口中 IWheelPickerpublic int getCurtainColor()
IWheelPickerGet color of curtain For example 0xFF123456
getCurtainColor 在接口中 IWheelPickerpublic void setCurtainColor(int color)
IWheelPickerSet color of curtain For example 0xFF123456
setCurtainColor 在接口中 IWheelPickercolor - 滚轮选择器幕布颜色,16位颜色值public void setAtmospheric(boolean hasAtmospheric)
IWheelPickerSet whether WheelPicker has atmospheric or not WheelPicker's items will be transparent from center to ends if atmospheric display
setAtmospheric 在接口中 IWheelPickerhasAtmospheric - 滚轮选择器是否有空气感public boolean hasAtmospheric()
IWheelPickerWhether WheelPicker has atmospheric or not
hasAtmospheric 在接口中 IWheelPickerpublic boolean isCurved()
IWheelPickerWhether WheelPicker enable curved effect or not
isCurved 在接口中 IWheelPickerpublic void setCurved(boolean isCurved)
IWheelPickerSet whether WheelPicker enable curved effect or not If setCurved true, WheelPicker will display with curved effect looks like ends bend into screen with perspective. WheelPicker's curved effect base on strict geometric model, some parameters relate with size maybe invalidated, for example each item size looks like different because of perspective in curved, the space between items looks like have a little difference
setCurved 在接口中 IWheelPickerisCurved - 滚轮选择器是否开启卷曲效果@Deprecated public int getItemAlign()
IWheelPickerGet alignment of WheelPicker
getItemAlign 在接口中 IWheelPicker@Deprecated public void setItemAlign(int align)
IWheelPickerWheelPicker.ALIGN_CENTER
Set alignment of WheelPicker
The default alignment of WheelPicker is WheelPicker.ALIGN_CENTER
setItemAlign 在接口中 IWheelPickeralign - 对齐方式标识值
该值仅能是下列值之一:
WheelPicker.ALIGN_CENTER
WheelPicker.ALIGN_LEFT
WheelPicker.ALIGN_RIGHTpublic android.graphics.Typeface getTypeface()
IWheelPickerGet typeface of item text
getTypeface 在接口中 IWheelPickerpublic void setTypeface(android.graphics.Typeface tf)
IWheelPickerSet typeface of item text Set typeface of item text maybe cause WheelPicker size change
setTypeface 在接口中 IWheelPickertf - 字体对象public void setOnDateSelectedListener(WheelDatePicker.OnDateSelectedListener listener)
setOnDateSelectedListener 在接口中 IWheelDatePickerpublic Date getCurrentDate()
getCurrentDate 在接口中 IWheelDatePickerpublic int getItemAlignYear()
getItemAlignYear 在接口中 IWheelDatePickerpublic void setItemAlignYear(int align)
setItemAlignYear 在接口中 IWheelDatePickerpublic int getItemAlignMonth()
getItemAlignMonth 在接口中 IWheelDatePickerpublic void setItemAlignMonth(int align)
setItemAlignMonth 在接口中 IWheelDatePickerpublic int getItemAlignDay()
getItemAlignDay 在接口中 IWheelDatePickerpublic void setItemAlignDay(int align)
setItemAlignDay 在接口中 IWheelDatePickerpublic WheelYearPicker getWheelYearPicker()
getWheelYearPicker 在接口中 IWheelDatePickerpublic WheelMonthPicker getWheelMonthPicker()
getWheelMonthPicker 在接口中 IWheelDatePickerpublic WheelDayPicker getWheelDayPicker()
getWheelDayPicker 在接口中 IWheelDatePickerpublic android.widget.TextView getTextViewYear()
getTextViewYear 在接口中 IWheelDatePickerpublic android.widget.TextView getTextViewMonth()
getTextViewMonth 在接口中 IWheelDatePickerpublic android.widget.TextView getTextViewDay()
getTextViewDay 在接口中 IWheelDatePickerpublic void setYearFrame(int start,
int end)
IWheelYearPickersetYearFrame 在接口中 IWheelYearPickerstart - 开始的年份end - 结束的年份public int getYearStart()
IWheelYearPickergetYearStart 在接口中 IWheelYearPickerpublic void setYearStart(int start)
IWheelYearPickersetYearStart 在接口中 IWheelYearPickerstart - 开始的年份public int getYearEnd()
IWheelYearPickergetYearEnd 在接口中 IWheelYearPickerpublic void setYearEnd(int end)
IWheelYearPickersetYearEnd 在接口中 IWheelYearPickerend - 结束的年份public int getSelectedYear()
IWheelYearPickergetSelectedYear 在接口中 IWheelYearPickerpublic void setSelectedYear(int year)
IWheelYearPickersetSelectedYear 在接口中 IWheelYearPickeryear - 年份选择器初始化时选中的年份public int getCurrentYear()
IWheelYearPickergetCurrentYear 在接口中 IWheelYearPickerpublic int getSelectedMonth()
IWheelMonthPickergetSelectedMonth 在接口中 IWheelMonthPickerpublic void setSelectedMonth(int month)
IWheelMonthPickersetSelectedMonth 在接口中 IWheelMonthPickermonth - 选择的月份public int getCurrentMonth()
IWheelMonthPickergetCurrentMonth 在接口中 IWheelMonthPickerpublic int getSelectedDay()
IWheelDayPickergetSelectedDay 在接口中 IWheelDayPickerpublic void setSelectedDay(int day)
IWheelDayPickersetSelectedDay 在接口中 IWheelDayPickerday - 选择的日期public int getCurrentDay()
IWheelDayPickergetCurrentDay 在接口中 IWheelDayPickerpublic void setYearAndMonth(int year,
int month)
IWheelDayPickersetYearAndMonth 在接口中 IWheelDayPickeryear - 年份month - 月份public int getYear()
IWheelDayPickergetYear 在接口中 IWheelDayPickerpublic void setYear(int year)
IWheelDayPickersetYear 在接口中 IWheelDayPickeryear - ...public int getMonth()
IWheelDayPickergetMonth 在接口中 IWheelDayPickerpublic void setMonth(int month)
IWheelDayPickersetMonth 在接口中 IWheelDayPickermonth - 月份