-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource,androidx.core.view.NestedScrollingChild,androidx.core.view.NestedScrollingChild2,androidx.core.view.NestedScrollingChild3,androidx.core.view.ScrollingView
public class YearCalendarView extends RecyclerView
A year-based calendar view.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description YearCalendarView(Context context)YearCalendarView(Context context, AttributeSet attrs)YearCalendarView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
Method Summary
Modifier and Type Method Description final MonthDayBinder<?>getDayBinder()The MonthDayBinder instance used for managing day cell view creation and reuse on the calendar. final UnitsetDayBinder(MonthDayBinder<?> dayBinder)final MonthHeaderFooterBinder<?>getMonthHeaderBinder()The MonthHeaderFooterBinder instance used for managing the header views shown above each month on the calendar. final UnitsetMonthHeaderBinder(MonthHeaderFooterBinder<?> monthHeaderBinder)final MonthHeaderFooterBinder<?>getMonthFooterBinder()The MonthHeaderFooterBinder instance used for managing the footer views shown below each month on the calendar. final UnitsetMonthFooterBinder(MonthHeaderFooterBinder<?> monthFooterBinder)final YearHeaderFooterBinder<?>getYearHeaderBinder()The YearHeaderFooterBinder instance used for managing the header views shown above each year on the calendar. final UnitsetYearHeaderBinder(YearHeaderFooterBinder<?> yearHeaderBinder)final YearHeaderFooterBinder<?>getYearFooterBinder()The YearHeaderFooterBinder instance used for managing the footer views shown below each year on the calendar. final UnitsetYearFooterBinder(YearHeaderFooterBinder<?> yearFooterBinder)final Function1<CalendarYear, Unit>getYearScrollListener()Called when the calendar scrolls to a new year. final UnitsetYearScrollListener(Function1<CalendarYear, Unit> yearScrollListener)Called when the calendar scrolls to a new year. final IntegergetDayViewResource()The xml resource that is inflated and used as the day cell view. final UnitsetDayViewResource(Integer dayViewResource)final IntegergetMonthHeaderResource()The xml resource that is inflated and used as a header for each month. final UnitsetMonthHeaderResource(Integer monthHeaderResource)final IntegergetMonthFooterResource()The xml resource that is inflated and used as a footer for each month. final UnitsetMonthFooterResource(Integer monthFooterResource)final IntegergetYearHeaderResource()The xml resource that is inflated and used as a header for each year. final UnitsetYearHeaderResource(Integer yearHeaderResource)final IntegergetYearFooterResource()The xml resource that is inflated and used as a footer for each year. final UnitsetYearFooterResource(Integer yearFooterResource)final StringgetMonthViewClass()The fully qualified class name of a ViewGroup that is instantiated and used as the container for each month. final UnitsetMonthViewClass(String monthViewClass)final StringgetYearViewClass()The fully qualified class name of a ViewGroup that is instantiated and used as the container for each year. final UnitsetYearViewClass(String yearViewClass)final IntegergetMonthVerticalSpacing()The vertical spacing between month rows in each year. final UnitsetMonthVerticalSpacing(@Px() Integer monthVerticalSpacing)final IntegergetMonthHorizontalSpacing()The horizontal spacing between month columns in each year. final UnitsetMonthHorizontalSpacing(@Px() Integer monthHorizontalSpacing)final IntegergetMonthColumns()The number of month columns in each year. final UnitsetMonthColumns(@IntRange(from = 1.toLong(), to = 12.toLong()) Integer monthColumns)final Function1<CalendarMonth, Boolean>getIsMonthVisible()Determines if a month is shown on the calendar grid. final UnitsetIsMonthVisible(Function1<CalendarMonth, Boolean> isMonthVisible)final IntegergetOrientation()The RecyclerView.Orientation used for the layout manager. final UnitsetOrientation(Integer orientation)final BooleangetScrollPaged()The scrolling behavior of the calendar. final UnitsetScrollPaged(Boolean scrollPaged)final OutDateStylegetOutDateStyle()Determines how outDates are generated for each month on the calendar. final UnitsetOutDateStyle(OutDateStyle outDateStyle)final DaySizegetDaySize()Determines how the size of each day on the calendar is calculated. final UnitsetDaySize(DaySize daySize)final MonthHeightgetMonthHeight()Determines how the height of each month on the calendar is calculated. final UnitsetMonthHeight(MonthHeight monthHeight)final MarginValuesgetYearMargins()The margins, in pixels to be applied on each year view. final UnitsetYearMargins(MarginValues yearMargins)final MarginValuesgetYearBodyMargins()The margins, in pixels to be applied on each year body view. final UnitsetYearBodyMargins(MarginValues yearBodyMargins)final LayoutHelpergetLayoutHelper()Helper class with methods that can be overridden in the internal layout manager. final UnitsetLayoutHelper(LayoutHelper layoutHelper)Helper class with methods that can be overridden in the internal layout manager. final UnitscrollToYear(Year year)Scroll to a specific year on the calendar. final UnitsmoothScrollToYear(Year year)Scroll to a specific year on the calendar using a smooth scrolling animation. final UnitscrollToMonth(YearMonth month)Scroll to a specific month on the calendar. final UnitsmoothScrollToMonth(YearMonth month)Scroll to a specific month on the calendar using a smooth scrolling animation. final UnitscrollToDay(CalendarDay day)Scroll to a specific CalendarDay. final UnitscrollToDate(LocalDate date, DayPosition position)Shortcut for scrollToDay with a LocalDate instance. final UnitscrollToDate(LocalDate date)Shortcut for scrollToDay with a LocalDate instance. final UnitsmoothScrollToDay(CalendarDay day)Scroll to a specific CalendarDay using a smooth scrolling animation. final UnitsmoothScrollToDate(LocalDate date, DayPosition position)Shortcut for smoothScrollToDay with a LocalDate instance. final UnitsmoothScrollToDate(LocalDate date)Shortcut for smoothScrollToDay with a LocalDate instance. final UnitnotifyDayChanged(CalendarDay day)Notify the calendar to reload the cell for this CalendarDay This causes MonthDayBinder.bind to be called with the ViewContainer at this position. final UnitnotifyDateChanged(LocalDate date, DayPosition position)Shortcut for notifyDayChanged with a LocalDate instance. final UnitnotifyDateChanged(LocalDate date)Shortcut for notifyDayChanged with a LocalDate instance. final UnitnotifyDateChanged(LocalDate date, DayPosition position)Notify the calendar to reload the cells for this LocalDate in the specified day positions. final UnitnotifyMonthChanged(YearMonth month)Notify the calendar to reload the view for this month. final UnitnotifyYearChanged(Year year)Notify the calendar to reload the view for this year. final UnitnotifyCalendarChanged()Notify the calendar to reload all years. final CalendarYearfindFirstVisibleYear()Find the first visible year on the calendar. final CalendarYearfindLastVisibleYear()Find the last visible year on the calendar. final CalendarMonthfindFirstVisibleMonth()Find the first visible month on the calendar. final CalendarMonthfindLastVisibleMonth()Find the last visible month on the calendar. final CalendarDayfindFirstVisibleDay()Find the first visible day on the calendar. final CalendarDayfindLastVisibleDay()Find the last visible day on the calendar. final Unitsetup(Year startYear, Year endYear, DayOfWeek firstDayOfWeek)Setup the calendar. final UnitupdateYearData(Year startYear, Year endYear, DayOfWeek firstDayOfWeek)Update the calendar's start year or end year or the first day of week. final UnitupdateYearData(Year startYear, Year endYear)Update the calendar's start year or end year or the first day of week. final UnitupdateYearData(Year startYear)Update the calendar's start year or end year or the first day of week. final UnitupdateYearData()Update the calendar's start year or end year or the first day of week. -
Methods inherited from class android.view.ViewGroup
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearPendingCredentialRequest, clearViewTranslationCallback, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedPrePerformAccessibilityAction, drawableHotspotChanged, findOnBackInvokedDispatcher, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateDisplayHash, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAllowedHandwritingDelegatePackageName, getAllowedHandwritingDelegatorPackageName, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContentSensitivity, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getFrameContentVelocity, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHandwritingBoundsOffsetBottom, getHandwritingBoundsOffsetLeft, getHandwritingBoundsOffsetRight, getHandwritingBoundsOffsetTop, getHandwritingDelegateFlags, getHandwritingDelegatorCallback, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPendingCredentialCallback, getPendingCredentialRequest, getPivotX, getPivotY, getPointerIcon, getPreferKeepClearRects, getReceiveContentMimeTypes, getRequestedFrameRate, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSupplementalDescription, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityDataSensitive, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAutoHandwritingEnabled, isClickable, isContentSensitive, isContextClickable, isCredential, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHandwritingDelegate, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onRtlPropertiesChanged, onScreenStateChanged, onScrollCaptureSearch, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, reportAppJankStats, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPivot, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, sendAccessibilityEvent, setAccessibilityDataSensitive, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAllowedHandwritingDelegatePackage, setAllowedHandwritingDelegatorPackage, setAlpha, setAnimation, setAnimationMatrix, setAutoHandwritingEnabled, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContentSensitivity, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setFrameContentVelocity, setHandwritingBoundsOffsets, setHandwritingDelegateFlags, setHandwritingDelegatorCallback, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setIsCredential, setIsHandwritingDelegate, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPendingCredentialRequest, setPivotX, setPivotY, setPointerIcon, setPreferKeepClear, setPreferKeepClearRects, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSupplementalDescription, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw -
Methods inherited from class com.kizitonwose.calendar.view.YearCalendarView
absorbGlows, addFocusables, addItemDecoration, addItemDecoration, addOnChildAttachStateChangeListener, addOnItemTouchListener, addOnScrollListener, addRecyclerListener, animateAppearance, animateDisappearance, assertInLayoutOrScroll, assertNotInLayoutOrScroll, canReuseUpdatedViewHolder, checkLayoutParams, clearOldPositions, clearOnChildAttachStateChangeListeners, clearOnScrollListeners, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, considerReleasingGlowsOnScroll, consumeFlingInHorizontalStretch, consumeFlingInVerticalStretch, consumePendingUpdateOperations, defaultOnMeasure, dispatchChildAttached, dispatchChildDetached, dispatchKeyEvent, dispatchLayout, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPreScroll, dispatchNestedPreScroll, dispatchNestedScroll, dispatchNestedScroll, dispatchNestedScroll, dispatchOnScrollStateChanged, dispatchOnScrolled, dispatchPendingImportantForAccessibilityChanges, dispatchPopulateAccessibilityEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, draw, drawChild, ensureBottomGlow, ensureLeftGlow, ensureRightGlow, ensureTopGlow, exceptionLabel, fillRemainingScrollValues, findChildViewUnder, findContainingItemView, findContainingViewHolder, findViewHolderForAdapterPosition, findViewHolderForItemId, findViewHolderForLayoutPosition, findViewHolderForPosition, findViewHolderForPosition, fling, flingNoThresholdCheck, focusSearch, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getAdapter, getAdapterPositionInRecyclerView, getBaseline, getChangedHolderKey, getChildAdapterPosition, getChildDrawingOrder, getChildItemId, getChildLayoutPosition, getChildPosition, getChildViewHolder, getClipToPadding, getCompatAccessibilityDelegate, getDecoratedBoundsWithMargins, getEdgeEffectFactory, getItemAnimator, getItemDecorInsetsForChild, getItemDecorationAt, getItemDecorationCount, getLayoutManager, getMaxFlingVelocity, getMinFlingVelocity, getNanoTime, getOnFlingListener, getPreserveFocusAfterLayout, getRecycledViewPool, getScrollState, hasFixedSize, hasNestedScrollingParent, hasNestedScrollingParent, hasPendingAdapterUpdates, initAdapterManager, initFastScroller, invalidateGlows, invalidateItemDecorations, isAccessibilityEnabled, isAnimating, isAttachedToWindow, isComputingLayout, isLayoutFrozen, isLayoutSuppressed, isNestedScrollingEnabled, jumpToPositionForSmoothScroller, markItemDecorInsetsDirty, markKnownViewsInvalid, nestedScrollBy, offsetChildrenHorizontal, offsetChildrenVertical, offsetPositionRecordsForInsert, offsetPositionRecordsForMove, offsetPositionRecordsForRemove, onAttachedToWindow, onChildAttachedToWindow, onChildDetachedFromWindow, onDetachedFromWindow, onDraw, onEnterLayoutOrScroll, onExitLayoutOrScroll, onExitLayoutOrScroll, onGenericMotionEvent, onInterceptTouchEvent, onLayout, onMeasure, onRequestFocusInDescendants, onRestoreInstanceState, onSaveInstanceState, onScrollStateChanged, onScrolled, onSizeChanged, onTouchEvent, postAnimationRunner, processDataSetCompletelyChanged, recordAnimationInfoIfBouncedHiddenView, removeAndRecycleViews, removeAnimatingView, removeDetachedView, removeItemDecoration, removeItemDecorationAt, removeOnChildAttachStateChangeListener, removeOnItemTouchListener, removeOnScrollListener, removeRecyclerListener, repositionShadowingViews, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestLayout, saveOldPositions, scrollBy, scrollByInternal, scrollStep, scrollTo, scrollToPosition, sendAccessibilityEventUnchecked, setAccessibilityDelegateCompat, setAdapter, setChildDrawingOrderCallback, setChildImportantForAccessibilityInternal, setClipToPadding, setEdgeEffectFactory, setHasFixedSize, setItemAnimator, setItemViewCacheSize, setLayoutFrozen, setLayoutManager, setLayoutTransition, setNestedScrollingEnabled, setOnFlingListener, setOnScrollListener, setPreserveFocusAfterLayout, setRecycledViewPool, setRecyclerListener, setScrollState, setScrollingTouchSlop, setViewCacheExtension, shouldDeferAccessibilityEvent, smoothScrollBy, smoothScrollBy, smoothScrollBy, smoothScrollBy, smoothScrollToPosition, startInterceptRequestLayout, startNestedScroll, startNestedScroll, stopInterceptRequestLayout, stopNestedScroll, stopNestedScroll, stopScroll, suppressLayout, swapAdapter, viewRangeUpdate -
Methods inherited from class androidx.recyclerview.widget.RecyclerView
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addKeyboardNavigationClusters, 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, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, endViewTransition, findFocus, findOnBackInvokedDispatcherForChild, findViewsWithText, focusableViewAvailable, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildWithMargins, measureChildren, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onCreateDrawableState, onDescendantInvalidated, onInterceptHoverEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, propagateRequestedFrameRate, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setRequestedFrameRate, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, shouldDelayChildPressedState, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
YearCalendarView
YearCalendarView(Context context)
-
YearCalendarView
YearCalendarView(Context context, AttributeSet attrs)
-
YearCalendarView
YearCalendarView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
-
Method Detail
-
getDayBinder
final MonthDayBinder<?> getDayBinder()
The MonthDayBinder instance used for managing day cell view creation and reuse on the calendar.
-
setDayBinder
final Unit setDayBinder(MonthDayBinder<?> dayBinder)
-
getMonthHeaderBinder
final MonthHeaderFooterBinder<?> getMonthHeaderBinder()
The MonthHeaderFooterBinder instance used for managing the header views shown above each month on the calendar.
-
setMonthHeaderBinder
final Unit setMonthHeaderBinder(MonthHeaderFooterBinder<?> monthHeaderBinder)
-
getMonthFooterBinder
final MonthHeaderFooterBinder<?> getMonthFooterBinder()
The MonthHeaderFooterBinder instance used for managing the footer views shown below each month on the calendar.
-
setMonthFooterBinder
final Unit setMonthFooterBinder(MonthHeaderFooterBinder<?> monthFooterBinder)
-
getYearHeaderBinder
final YearHeaderFooterBinder<?> getYearHeaderBinder()
The YearHeaderFooterBinder instance used for managing the header views shown above each year on the calendar.
-
setYearHeaderBinder
final Unit setYearHeaderBinder(YearHeaderFooterBinder<?> yearHeaderBinder)
-
getYearFooterBinder
final YearHeaderFooterBinder<?> getYearFooterBinder()
The YearHeaderFooterBinder instance used for managing the footer views shown below each year on the calendar.
-
setYearFooterBinder
final Unit setYearFooterBinder(YearHeaderFooterBinder<?> yearFooterBinder)
-
getYearScrollListener
final Function1<CalendarYear, Unit> getYearScrollListener()
Called when the calendar scrolls to a new year. Mostly beneficial if scrollPaged is
true.
-
setYearScrollListener
final Unit setYearScrollListener(Function1<CalendarYear, Unit> yearScrollListener)
Called when the calendar scrolls to a new year. Mostly beneficial if scrollPaged is
true.
-
getDayViewResource
final Integer getDayViewResource()
The xml resource that is inflated and used as the day cell view. This must be provided.
-
setDayViewResource
final Unit setDayViewResource(Integer dayViewResource)
-
getMonthHeaderResource
final Integer getMonthHeaderResource()
The xml resource that is inflated and used as a header for each month. Set zero to disable.
-
setMonthHeaderResource
final Unit setMonthHeaderResource(Integer monthHeaderResource)
-
getMonthFooterResource
final Integer getMonthFooterResource()
The xml resource that is inflated and used as a footer for each month. Set zero to disable.
-
setMonthFooterResource
final Unit setMonthFooterResource(Integer monthFooterResource)
-
getYearHeaderResource
final Integer getYearHeaderResource()
The xml resource that is inflated and used as a header for each year. Set zero to disable.
-
setYearHeaderResource
final Unit setYearHeaderResource(Integer yearHeaderResource)
-
getYearFooterResource
final Integer getYearFooterResource()
The xml resource that is inflated and used as a footer for each year. Set zero to disable.
-
setYearFooterResource
final Unit setYearFooterResource(Integer yearFooterResource)
-
getMonthViewClass
final String getMonthViewClass()
-
setMonthViewClass
final Unit setMonthViewClass(String monthViewClass)
-
getYearViewClass
final String getYearViewClass()
-
setYearViewClass
final Unit setYearViewClass(String yearViewClass)
-
getMonthVerticalSpacing
final Integer getMonthVerticalSpacing()
The vertical spacing between month rows in each year.
-
setMonthVerticalSpacing
final Unit setMonthVerticalSpacing(@Px() Integer monthVerticalSpacing)
-
getMonthHorizontalSpacing
final Integer getMonthHorizontalSpacing()
The horizontal spacing between month columns in each year.
-
setMonthHorizontalSpacing
final Unit setMonthHorizontalSpacing(@Px() Integer monthHorizontalSpacing)
-
getMonthColumns
final Integer getMonthColumns()
The number of month columns in each year. Must be from 1 to 12.
-
setMonthColumns
final Unit setMonthColumns(@IntRange(from = 1.toLong(), to = 12.toLong()) Integer monthColumns)
-
getIsMonthVisible
final Function1<CalendarMonth, Boolean> getIsMonthVisible()
Determines if a month is shown on the calendar grid. For example, you can use this to hide all past months.
-
setIsMonthVisible
final Unit setIsMonthVisible(Function1<CalendarMonth, Boolean> isMonthVisible)
-
getOrientation
final Integer getOrientation()
The RecyclerView.Orientation used for the layout manager. This determines the scroll direction of the calendar.
-
setOrientation
final Unit setOrientation(Integer orientation)
-
getScrollPaged
final Boolean getScrollPaged()
The scrolling behavior of the calendar. If
true, the calendar will snap to the nearest year after a scroll or swipe action. Iffalse, the calendar scrolls normally.
-
setScrollPaged
final Unit setScrollPaged(Boolean scrollPaged)
-
getOutDateStyle
final OutDateStyle getOutDateStyle()
Determines how outDates are generated for each month on the calendar. Can be OutDateStyle.EndOfRow or OutDateStyle.EndOfGrid.
-
setOutDateStyle
final Unit setOutDateStyle(OutDateStyle outDateStyle)
-
getDaySize
final DaySize getDaySize()
Determines how the size of each day on the calendar is calculated. See the DaySize class documentation to understand each value.
-
setDaySize
final Unit setDaySize(DaySize daySize)
-
getMonthHeight
final MonthHeight getMonthHeight()
Determines how the height of each month on the calendar is calculated. See the MonthHeight class documentation to understand each value.
-
setMonthHeight
final Unit setMonthHeight(MonthHeight monthHeight)
-
getYearMargins
final MarginValues getYearMargins()
The margins, in pixels to be applied on each year view. This is the container in which the year header, body and footer are placed. For example, this can be used to add a space between two years.
-
setYearMargins
final Unit setYearMargins(MarginValues yearMargins)
-
getYearBodyMargins
final MarginValues getYearBodyMargins()
The margins, in pixels to be applied on each year body view. This is the grid in which the months in each year are shown, excluding the year header and footer.
-
setYearBodyMargins
final Unit setYearBodyMargins(MarginValues yearBodyMargins)
-
getLayoutHelper
final LayoutHelper getLayoutHelper()
Helper class with methods that can be overridden in the internal layout manager.
-
setLayoutHelper
final Unit setLayoutHelper(LayoutHelper layoutHelper)
Helper class with methods that can be overridden in the internal layout manager.
-
scrollToYear
final Unit scrollToYear(Year year)
Scroll to a specific year on the calendar. This instantly shows the view for the year without any animations. For a smooth scrolling effect, use smoothScrollToYear
-
smoothScrollToYear
final Unit smoothScrollToYear(Year year)
Scroll to a specific year on the calendar using a smooth scrolling animation. Just like scrollToYear, but with a smooth scrolling animation.
-
scrollToMonth
final Unit scrollToMonth(YearMonth month)
Scroll to a specific month on the calendar. This instantly shows the view for the month without any animations. For a smooth scrolling effect, use smoothScrollToMonth
-
smoothScrollToMonth
final Unit smoothScrollToMonth(YearMonth month)
Scroll to a specific month on the calendar using a smooth scrolling animation. Just like scrollToMonth, but with a smooth scrolling animation.
-
scrollToDay
final Unit scrollToDay(CalendarDay day)
Scroll to a specific CalendarDay. This brings the date cell view's top to the top of the CalendarVew in vertical mode or the cell view's left edge to the left edge of the CalendarVew in horizontal mode. No animation is performed. For a smooth scrolling effect, use smoothScrollToDay.
-
scrollToDate
@JvmOverloads() final Unit scrollToDate(LocalDate date, DayPosition position)
Shortcut for scrollToDay with a LocalDate instance.
-
scrollToDate
@JvmOverloads() final Unit scrollToDate(LocalDate date)
Shortcut for scrollToDay with a LocalDate instance.
-
smoothScrollToDay
final Unit smoothScrollToDay(CalendarDay day)
Scroll to a specific CalendarDay using a smooth scrolling animation. Just like scrollToDay, but with a smooth scrolling animation.
-
smoothScrollToDate
@JvmOverloads() final Unit smoothScrollToDate(LocalDate date, DayPosition position)
Shortcut for smoothScrollToDay with a LocalDate instance.
-
smoothScrollToDate
@JvmOverloads() final Unit smoothScrollToDate(LocalDate date)
Shortcut for smoothScrollToDay with a LocalDate instance.
-
notifyDayChanged
final Unit notifyDayChanged(CalendarDay day)
Notify the calendar to reload the cell for this CalendarDay This causes MonthDayBinder.bind to be called with the ViewContainer at this position. Use this to reload a date cell on the Calendar.
-
notifyDateChanged
@JvmOverloads() final Unit notifyDateChanged(LocalDate date, DayPosition position)
Shortcut for notifyDayChanged with a LocalDate instance.
-
notifyDateChanged
@JvmOverloads() final Unit notifyDateChanged(LocalDate date)
Shortcut for notifyDayChanged with a LocalDate instance.
-
notifyDateChanged
final Unit notifyDateChanged(LocalDate date, DayPosition position)
Notify the calendar to reload the cells for this LocalDate in the specified day positions. This causes MonthDayBinder.bind to be called with the ViewContainer at the relevant DayPosition values.
-
notifyMonthChanged
final Unit notifyMonthChanged(YearMonth month)
Notify the calendar to reload the view for this month.
This causes the following sequence of events:
MonthHeaderFooterBinder.bind will be called for this month's header view if available.
MonthDayBinder.bind will be called for all dates in this month.
MonthHeaderFooterBinder.bind will be called for this month's footer view if available.
-
notifyYearChanged
final Unit notifyYearChanged(Year year)
Notify the calendar to reload the view for this year.
This causes the following sequence of events:
YearHeaderFooterBinder.bind will be called for this year's header view if available.
MonthHeaderFooterBinder.bind will be called for each month's header view in this year if available.
MonthDayBinder.bind will be called for all dates in this year.
MonthHeaderFooterBinder.bind will be called for each month's footer view if available.
YearHeaderFooterBinder.bind will be called for this year's footer view in this year if available.
-
notifyCalendarChanged
final Unit notifyCalendarChanged()
Notify the calendar to reload all years.
-
findFirstVisibleYear
final CalendarYear findFirstVisibleYear()
Find the first visible year on the calendar.
-
findLastVisibleYear
final CalendarYear findLastVisibleYear()
Find the last visible year on the calendar.
-
findFirstVisibleMonth
final CalendarMonth findFirstVisibleMonth()
Find the first visible month on the calendar.
-
findLastVisibleMonth
final CalendarMonth findLastVisibleMonth()
Find the last visible month on the calendar.
-
findFirstVisibleDay
final CalendarDay findFirstVisibleDay()
Find the first visible day on the calendar. This is the day at the top-left corner of the calendar.
-
findLastVisibleDay
final CalendarDay findLastVisibleDay()
Find the last visible day on the calendar. This is the day at the bottom-right corner of the calendar.
-
setup
final Unit setup(Year startYear, Year endYear, DayOfWeek firstDayOfWeek)
Setup the calendar. See updateYearData to update these values.
- Parameters:
startYear- The first year on the calendar.endYear- The last year on the calendar.firstDayOfWeek- A DayOfWeek to be the first day of week.
-
updateYearData
@JvmOverloads() final Unit updateYearData(Year startYear, Year endYear, DayOfWeek firstDayOfWeek)
Update the calendar's start year or end year or the first day of week. This can be called only if you have previously called setup. The calendar can handle really large date ranges so you may want to setup the calendar with a large date range instead of updating the range frequently.
-
updateYearData
@JvmOverloads() final Unit updateYearData(Year startYear, Year endYear)
Update the calendar's start year or end year or the first day of week. This can be called only if you have previously called setup. The calendar can handle really large date ranges so you may want to setup the calendar with a large date range instead of updating the range frequently.
-
updateYearData
@JvmOverloads() final Unit updateYearData(Year startYear)
Update the calendar's start year or end year or the first day of week. This can be called only if you have previously called setup. The calendar can handle really large date ranges so you may want to setup the calendar with a large date range instead of updating the range frequently.
-
updateYearData
@JvmOverloads() final Unit updateYearData()
Update the calendar's start year or end year or the first day of week. This can be called only if you have previously called setup. The calendar can handle really large date ranges so you may want to setup the calendar with a large date range instead of updating the range frequently.
-
-
-
-