public class RadCalendarView extends ViewGroup
Modifier and Type | Class and Description |
---|---|
static interface |
RadCalendarView.OnCellClickListener
Represents an interface for a listener that will execute its method when
a cell from the
RadCalendarView is clicked. |
static interface |
RadCalendarView.OnDisplayDateChangedListener
Represents an interface for a listener that will execute its method when
the display date in
RadCalendarView is changed. |
static interface |
RadCalendarView.OnDisplayModeChangedListener
Represents an interface for a listener that will execute its method when
the display mode in
RadCalendarView is changed. |
static interface |
RadCalendarView.OnSelectedDatesChangedListener
Represents an interface for a listener that will execute its method when
the selected dates in
RadCalendarView are changed. |
static class |
RadCalendarView.SelectionContext
Represents a class which represents a context for selection.
|
ViewGroup.LayoutParams, ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnApplyWindowInsetsListener, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener
Modifier and Type | Field and Description |
---|---|
boolean |
suspendDisplayModeChange |
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_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, 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, 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, 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, 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, VISIBLE, X, Y, Z
Constructor and Description |
---|
RadCalendarView(Context context)
Creates an instance of the
RadCalendarView class. |
RadCalendarView(Context context,
AttributeSet attrs)
Creates an instance of the
RadCalendarView class. |
RadCalendarView(Context context,
AttributeSet attrs,
int defStyle)
Creates an instance of the
RadCalendarView class. |
Modifier and Type | Method and Description |
---|---|
void |
addDayCellStyle(CalendarDayCellStyle cellStyle) |
void |
addMonthCellStyle(CalendarMonthCellStyle cellStyle) |
void |
animateToNext()
Changes the display date to a date that is not currently visible.
|
void |
animateToPrevious()
Changes the display date to a date that is not currently visible.
|
void |
applyDayCellStyles(CalendarDayCell cell) |
void |
applyMonthCellStyles(CalendarMonthCell cell) |
void |
beginUpdate()
Begins update thus preventing the calendar to invalidate.
|
void |
beginUpdate(boolean suspendArrange)
Begins update preventing the calendar to both invalidate and rearrange its elements.
|
boolean |
canShiftToNextDate()
States whether the calendar can shift forward to the next date in accordance to the current display mode and maximum date value.
|
boolean |
canShiftToPreviousDate()
States whether the calendar can shift back to the previous date in accordance to the current display mode and minimum date value.
|
void |
changeDisplayMode(CalendarDisplayMode displayMode) |
void |
changeDisplayMode(CalendarDisplayMode displayMode,
boolean animate)
Changes the current display mode with or without animation depending on the value
provided as parameter.
|
Hashtable<Long,List<CalendarDayCell>> |
dateToCell()
Holds a collection that has all the cells sorted and accessible vy date.
|
CalendarRow |
dayNames()
Gets the day names row.
|
void |
endUpdate()
Ends the update by calling the calendar to invalidate one single time.
|
void |
endUpdate(boolean releaseArrange)
Ends the update by first calling the
invalidateArrange() followed by an invalidation. |
EventsManager |
eventsManager() |
CalendarAdapter |
getAdapter()
Returns the currently used
CalendarAdapter
by this instance. |
CalendarAnimationsManager |
getAnimationsManager()
Gets the animations manager.
|
int |
getBackgroundColor() |
Calendar |
getCalendar()
Returns the current
Calendar used by the calendar. |
Decorator |
getCellDecorationsLayer()
Deprecated.
|
Decorator |
getCellDecorator()
Gets a decorator responsible for the decoration of the selected cells.
|
Procedure<CalendarCell> |
getCustomizationRule()
Returns a
Procedure which makes modifications
to a CalendarCell after it is updated and/or
created. |
Function<Long,Integer> |
getDateToColor()
Returns a
Function which determines the color that is
used for each date in this instance. |
int |
getDayNamesHeight()
Gets the height of the day names.
|
Function<Long,Integer> |
getDayNameToColor()
Gets the day name customization color.
|
CalendarDayView |
getDayView() |
long |
getDisplayDate()
Returns the current display date.
|
CalendarDisplayMode |
getDisplayMode()
Returns the current
CalendarDisplayMode . |
EventAdapter |
getEventAdapter()
Returns the currently used
EventAdapter . |
EventsDisplayMode |
getEventsDisplayMode() |
CalendarGestureManager |
getGestureManager()
Gets the manager responsible for handling the gestures.
|
GridLinesLayer |
getGridLinesLayer()
Gets the renderer responsible for rendering the grid lines.
|
Locale |
getLocale()
Returns the current
Locale used by the calendar. |
long |
getMaxDate()
Returns the current max date.
|
long |
getMinDate()
Returns the current min date.
|
RadCalendarView.OnSelectedDatesChangedListener |
getOnSelectedDatesChangedListener()
Gets the listener that is being called when a date has been selected.
|
CalendarScrollManager |
getScrollManager()
Gets the scroll manager.
|
ScrollMode |
getScrollMode()
Gets the scroll mode.
|
List<Long> |
getSelectedDates()
Gets the selected dates.
|
DateRange |
getSelectedRange()
Gets the selected range.
|
CalendarSelectionManager |
getSelectionManager()
Gets the selection manager.
|
CalendarSelectionMode |
getSelectionMode()
Returns the current
CalendarSelectionMode . |
boolean |
getShowCellDecorations()
Gets a value indicating whether there will be additional decorations for selected cells.
|
boolean |
getShowDayNames()
Returns a boolean which determines whether the current instance
will render day names.
|
boolean |
getShowGridLines()
Gets a value indicating whether grid lines between the cells will be drawn.
|
boolean |
getShowTitle()
Returns a boolean which determines whether the current instance
will render title.
|
boolean |
getShowWeekInDayMode()
Gets a value indicating whether the week is visible when
getDisplayMode() of the
calendar is Day. |
int |
getTitleHeight()
Gets the height of the title.
|
int |
getWeekHeightRequest()
Gets a value in pixels specifying the requested height for week shown when calendar's
display mode is Week or Day.
|
WeekNumbersDisplayMode |
getWeekNumbersDisplayMode()
Returns the currently used
WeekNumbersDisplayMode
by this instance. |
void |
invalidate() |
boolean |
isAnimationEnabled()
Gets a values stating whether the animations are enabled or not.
|
boolean |
isDrawingAllCells()
Gets a value determining whether to draw all cells of the different fragments, or only draw the cells of the current fragment's date.
|
boolean |
isDrawingHorizontalGridLines()
Gets a value determining whether the horizontal grid lines of the cells will be rendered.
|
boolean |
isDrawingVerticalGridLines()
Gets a value determining whether the vertical grid lines of the cells will be rendered.
|
boolean |
isHorizontalScroll()
Gets a value that determines whether the calendar will scroll horizontally or vertically.
|
boolean |
isInOriginalSizeForAllModes()
Returns a value which represents whether the calendar will keep its original size in all display modes.
|
boolean |
isYearModeCompact()
Returns a value which represents whether the calendar draws all days when the display mode is
Year . |
void |
notifyDataChanged()
Notifies the instance that it needs to updateActiveFragment,
for example when the events are added or updated.
|
boolean |
onDoubleTap(MotionEvent event)
Deprecated.
|
boolean |
onDoubleTapEvent(MotionEvent event)
Deprecated.
|
boolean |
onDown(MotionEvent event)
Deprecated.
|
boolean |
onFling(MotionEvent event1,
MotionEvent event2,
float velocity1,
float velocity2)
Deprecated.
|
void |
onLongPress(MotionEvent event)
Deprecated.
|
boolean |
onScale(ScaleGestureDetector scaleGestureDetector)
Deprecated.
|
boolean |
onScaleBegin(ScaleGestureDetector scaleGestureDetector)
Deprecated.
|
void |
onScaleEnd(ScaleGestureDetector scaleGestureDetector)
Deprecated.
|
boolean |
onScroll(MotionEvent event,
MotionEvent event2,
float v,
float v2)
Deprecated.
|
void |
onShowPress(MotionEvent e)
Deprecated.
|
boolean |
onSingleTapConfirmed(MotionEvent event)
Deprecated.
|
boolean |
onSingleTapUp(MotionEvent event)
Deprecated.
|
boolean |
onTouchEvent(MotionEvent event) |
void |
removeDayCellStyle(CalendarDayCellStyle cellStyle) |
void |
removeMonthCellStyle(CalendarMonthCellStyle cellStyle) |
void |
setAdapter(CalendarAdapter calendarAdapter)
Sets a new
CalendarAdapter instance that will be
used by this calendar instance to create and update its
CalendarCell instances. |
void |
setAnimationEnabled(boolean enabled)
Sets a values stating whether the animations are enabled or not.
|
void |
setAnimationsManager(CalendarAnimationsManager animationsManager)
Sets the animation manager.
|
void |
setBackgroundColor(int color) |
void |
setCalendar(Calendar calendar)
Sets a new
Calendar to be used by this instance. |
void |
setCellDecorationsLayer(CellDecorationsLayer cellDecorator)
Deprecated.
|
void |
setCellDecorator(Decorator cellDecorator)
Sets a decorator responsible for the decoration of the selected cells.
|
void |
setCustomizationRule(Procedure<CalendarCell> customizationRule)
Sets a
Procedure which makes modifications
to a CalendarCell after it is updated and/or
created. |
void |
setDateToColor(Function<Long,Integer> dateToColor)
Sets a
Function which determines the color that is
used for each date in this instance. |
void |
setDayNamesHeight(int dayNamesHeight)
Sets the height of the day names.
|
void |
setDayNameToColor(Function<Long,Integer> dayNameToColor)
Sets the day name customization color.
|
void |
setDayView(CalendarDayView dayView) |
void |
setDisplayDate(long value)
Sets a new display date.
|
void |
setDisplayDateSilent(long value) |
void |
setDisplayMode(CalendarDisplayMode value)
Sets a new
CalendarDisplayMode . |
void |
setDrawingAllCells(boolean drawingAllCells)
Sets a value determining whether to draw all cells of the different fragments, or only draw the cells of the current fragment's date.
|
void |
setDrawingHorizontalGridLines(boolean drawingHorizontalGridLines)
Sets a value determining whether the horizontal grid lines of the cells will be rendered.
|
void |
setDrawingVerticalGridLines(boolean drawingVerticalGridLines)
Sets a value determining whether the vertical grid lines of the cells will be rendered.
|
void |
setEventAdapter(EventAdapter eventAdapter)
Sets a new
EventAdapter that will be
used by this calendar instance. |
void |
setEventsDisplayMode(EventsDisplayMode eventsDisplayMode) |
void |
setGestureManager(CalendarGestureManager gestureManager)
Sets the manager responsible for handling the gestures.
|
void |
setGridLinesLayer(GridLinesLayer gridLinesLayer)
Sets the renderer responsible for rendering the grid lines.
|
void |
setHorizontalScroll(boolean horizontal)
Sets a value that determines whether the calendar will scroll horizontally or vertically.
|
void |
setInOriginalSizeForAllModes(boolean keepOriginalSizeInAllModes)
Sets a value which determines whether the calendar will keep its original size in all display modes.
|
void |
setLocale(Locale locale)
Sets a new
Locale to be used by the calendar. |
void |
setMaxDate(long maxDate)
Sets a new max date.
|
void |
setMinDate(long minDate)
Sets a new min date.
|
void |
setOnCellClickListener(RadCalendarView.OnCellClickListener listener)
Sets a listener to be called when a cell has been clicked.
|
void |
setOnDisplayDateChangedListener(RadCalendarView.OnDisplayDateChangedListener listener)
Sets a listener to be called when the display date has been changed.
|
void |
setOnDisplayModeChangedListener(RadCalendarView.OnDisplayModeChangedListener listener)
Sets a listener to be called when the display mode has been changed.
|
void |
setOnSelectedDatesChangedListener(RadCalendarView.OnSelectedDatesChangedListener listener)
Sets the listener that is being called when a date has been selected.
|
void |
setScrollManager(CalendarScrollManager scrollManager)
Sets the scroll manager.
|
void |
setScrollMode(ScrollMode scrollMode)
Sets the scroll mode.
|
void |
setSelectedDates(List<Long> selectedDates)
Sets the selected dates.
|
void |
setSelectedRange(DateRange selectionRange)
Sets the selected range.
|
void |
setSelectionManager(CalendarSelectionManager selectionManager)
Sets the selection manager.
|
void |
setSelectionMode(CalendarSelectionMode selectionMode)
Sets a new
CalendarSelectionMode . |
void |
setShowCellDecorations(boolean showCellDecorations)
Sets a value indicating whether there will be additional decorations for selected cells.
|
void |
setShowDayNames(boolean value)
Sets a boolean which determines whether the current instance
will render day names.
|
void |
setShowGridLines(boolean showGridLines)
Sets a value indicating whether grid lines between the cells will be drawn.
|
void |
setShowTitle(boolean value)
Sets a boolean which determines whether the current instance
will render title.
|
void |
setShowWeekInDayMode(boolean showWeekInDayMode)
Sets a value indicating whether the week is visible when
getDisplayMode() of the
calendar is Day. |
void |
setStretchInWeekMode(boolean stretchInWeekMode)
Sets a value which determines whether the calendar will stretch its cell during week mode.
|
void |
setTitleHeight(int titleHeight)
Sets the height of the title.
|
void |
setWeekHeightRequest(int weekHeightRequest)
Sets a value in pixels specifying the requested height for week shown when calendar's
display mode is Week or Day.
|
void |
setWeekNumbersDisplayMode(WeekNumbersDisplayMode value)
Sets a new
WeekNumbersDisplayMode that will be
used by this calendar instance to determine how the week number information will be
presented. |
void |
setYearModeCompact(boolean yearModeCompact)
Sets a value which determines whether the calendar will render all days when the display mode is
Year . |
void |
shiftDate(boolean increase)
Shifts the current date either forward or backward, having in mind the current display mode.
|
CalendarTextElement |
title()
Gets the calendar title element.
|
void |
updateCalendar() |
void |
updateFragments()
Used to update the calendar fragments according to the current display date.
|
void |
updateFragments(boolean force)
Used to update the calendar fragments according to the current display date.
|
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchSetActivated, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, generateLayoutParams, getAccessibilityClassName, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, 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, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, 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, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, 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, 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, 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, willNotCacheDrawing, willNotDraw
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayout
public RadCalendarView(Context context)
RadCalendarView
class.context
- the context to be usedpublic RadCalendarView(Context context, AttributeSet attrs)
RadCalendarView
class.context
- the context to be usedattrs
- the attributespublic RadCalendarView(Context context, AttributeSet attrs, int defStyle)
RadCalendarView
class.context
- the context to be usedattrs
- the attributesdefStyle
- the default stylepublic EventsDisplayMode getEventsDisplayMode()
public void setEventsDisplayMode(EventsDisplayMode eventsDisplayMode)
public EventsManager eventsManager()
public void addDayCellStyle(CalendarDayCellStyle cellStyle)
public void removeDayCellStyle(CalendarDayCellStyle cellStyle)
public void addMonthCellStyle(CalendarMonthCellStyle cellStyle)
public void removeMonthCellStyle(CalendarMonthCellStyle cellStyle)
public Function<Long,Integer> getDayNameToColor()
public void setDayNameToColor(Function<Long,Integer> dayNameToColor)
dayNameToColor
- the new day name customization color.public CalendarDayView getDayView()
public void setDayView(CalendarDayView dayView)
public boolean isDrawingAllCells()
true
if all cells should be drawn, false
otherwise.public void setDrawingAllCells(boolean drawingAllCells)
drawingAllCells
- true
if all cells should be drawn, false
otherwise.public boolean isDrawingVerticalGridLines()
true
if the vertical grid lines of the cells will be rendered, false
otherwise.public void setDrawingVerticalGridLines(boolean drawingVerticalGridLines)
drawingVerticalGridLines
- true
if the vertical grid lines of the cells will be rendered, false
otherwise.public boolean isDrawingHorizontalGridLines()
true
if the horizontal grid lines of the cells will be rendered, false
otherwise.public void setDrawingHorizontalGridLines(boolean drawingHorizontalGridLines)
drawingHorizontalGridLines
- true
if the horizontal grid lines of the cells will be rendered, false
otherwise.public int getDayNamesHeight()
public void setDayNamesHeight(int dayNamesHeight)
dayNamesHeight
- the new height for the day names to be stored.public int getTitleHeight()
public void setTitleHeight(int titleHeight)
titleHeight
- the new height for the title to be stored.public CalendarGestureManager getGestureManager()
public void setGestureManager(CalendarGestureManager gestureManager)
gestureManager
- the new gestures manager.public CalendarAnimationsManager getAnimationsManager()
public void setAnimationsManager(CalendarAnimationsManager animationsManager)
animationsManager
- the new animations manager.public CalendarSelectionManager getSelectionManager()
public void setSelectionManager(CalendarSelectionManager selectionManager)
selectionManager
- the new selection manager.public int getWeekHeightRequest()
public void setWeekHeightRequest(int weekHeightRequest)
weekHeightRequest
- the request for week heightpublic boolean isHorizontalScroll()
true
will result the calendar to scroll horizontally, false
will result it to scroll vertically.public void setHorizontalScroll(boolean horizontal)
horizontal
- the new scroll direction. true
will result the calendar to scroll horizontally, false
will result it to scroll vertically.public ScrollMode getScrollMode()
public void setScrollMode(ScrollMode scrollMode)
scrollMode
- the new scroll mode.public boolean isAnimationEnabled()
true
if the animations are enabled, false
otherwise.public void setAnimationEnabled(boolean enabled)
enabled
- the new animations state.public Hashtable<Long,List<CalendarDayCell>> dateToCell()
public CalendarAdapter getAdapter()
CalendarAdapter
by this instance. This calendarAdapter is used for getting and updating the
CalendarCell
instances which populate the calendar.public void setAdapter(CalendarAdapter calendarAdapter)
CalendarAdapter
instance that will be
used by this calendar instance to create and update its
CalendarCell
instances.calendarAdapter
- the new CalendarAdapterpublic long getDisplayDate()
long
and represents one of the
dates that are currently visible by the calendar.
The default value is today.public void setDisplayDate(long value)
value
- the new display datesetOnDisplayDateChangedListener(com.telerik.widget.calendar.RadCalendarView.OnDisplayDateChangedListener)
public void setDisplayDateSilent(long value)
public CalendarTextElement title()
public CalendarRow dayNames()
public void shiftDate(boolean increase)
increase
- true
will result in the current date to increase, false
will result in the date to decrease.public boolean canShiftToPreviousDate()
true
if the shift can be made, false
otherwise.public boolean canShiftToNextDate()
true
if the shift can be made, false
otherwise.public void animateToNext()
CalendarDisplayMode
.
If it is month, the display date is increased by one month, etc.
The value will not be changed if that would exceed the limits defined by max date.getDisplayMode()
,
animateToPrevious()
,
getMaxDate()
public void animateToPrevious()
CalendarDisplayMode
.
If it is month, the display date is decreased by one month, etc.
The value will not be changed if that would exceed the limits defined by min date.getDisplayMode()
,
animateToNext()
public void notifyDataChanged()
public int getBackgroundColor()
public void setBackgroundColor(int color)
setBackgroundColor
in class View
public boolean getShowGridLines()
public void setShowGridLines(boolean showGridLines)
showGridLines
- whether grid lines are shownpublic boolean getShowWeekInDayMode()
getDisplayMode()
of the
calendar is Day.public void setShowWeekInDayMode(boolean showWeekInDayMode)
getDisplayMode()
of the
calendar is Day.showWeekInDayMode
- whether week is shownpublic boolean getShowCellDecorations()
public void setShowCellDecorations(boolean showCellDecorations)
showCellDecorations
- whether additional decoration are drawn for the selected cellspublic Decorator getCellDecorationsLayer()
getCellDecorator()
instead.public void setCellDecorationsLayer(CellDecorationsLayer cellDecorator)
setCellDecorator(com.telerik.widget.calendar.decorations.Decorator)
instead.cellDecorator
- the layer that draws decoration for selected cellspublic Decorator getCellDecorator()
public void setCellDecorator(Decorator cellDecorator)
cellDecorator
- the new cells decorator.public WeekNumbersDisplayMode getWeekNumbersDisplayMode()
WeekNumbersDisplayMode
by this instance. This value defines how the week number information will be
visualized. The default value is None
which means that week number
information will not be visible.public void setWeekNumbersDisplayMode(WeekNumbersDisplayMode value)
WeekNumbersDisplayMode
that will be
used by this calendar instance to determine how the week number information will be
presented. The default value is None
.value
- the new week number display modepublic void updateCalendar()
public EventAdapter getEventAdapter()
EventAdapter
.
This calendarAdapter is responsible for the events that will be visualized by this instance.
The calendarAdapter defines the full list of events and determines
which of them should be visible for each date.public void setEventAdapter(EventAdapter eventAdapter)
EventAdapter
that will be
used by this calendar instance. This calendarAdapter will define the full list of events
that will be visualized and will determine which of them should be visible
for each date.eventAdapter
- a new event calendarAdapterpublic CalendarSelectionMode getSelectionMode()
CalendarSelectionMode
.
This mode determines the type of selection used by this instance. For example,
in all modes when you choose a cell it will be selected, however when you
choose another cell the selection will be determined by the selection mode.
If it is Single
, the old selection will be cleared.
If it si Multiple
, the new selection will consist of the both dates - the old and the new.
And if it is Range
, the new selection will consist of the whole range of dates between the old and the new date.
The default value is Multiple
.public void setSelectionMode(CalendarSelectionMode selectionMode)
CalendarSelectionMode
.
This mode determines the type of selection used by this instance. For example,
in all modes when you choose a cell it will be selected, however when you
choose another cell the selection will be determined by the selection mode.
If it is Single
, the old selection will be cleared.
If it si Multiple
, the new selection will consist of the both dates - the old and the new.
And if it is Range
, the new selection will consist of the whole range of dates between the old and the new date.
The default value is Multiple
.selectionMode
- a new calendar selection modepublic GridLinesLayer getGridLinesLayer()
public void setGridLinesLayer(GridLinesLayer gridLinesLayer)
gridLinesLayer
- the new grid lines renderer.public CalendarScrollManager getScrollManager()
public void setScrollManager(CalendarScrollManager scrollManager)
scrollManager
- the new scroll manager.public RadCalendarView.OnSelectedDatesChangedListener getOnSelectedDatesChangedListener()
public void setOnSelectedDatesChangedListener(RadCalendarView.OnSelectedDatesChangedListener listener)
listener
- the new date selected listener.public List<Long> getSelectedDates()
public void setSelectedDates(List<Long> selectedDates)
selectedDates
- the new selected dates.public DateRange getSelectedRange()
public void setSelectedRange(DateRange selectionRange)
selectionRange
- the new selected range.public void setOnDisplayDateChangedListener(RadCalendarView.OnDisplayDateChangedListener listener)
listener
- the new listener.public void setOnDisplayModeChangedListener(RadCalendarView.OnDisplayModeChangedListener listener)
listener
- the new listener.public void setOnCellClickListener(RadCalendarView.OnCellClickListener listener)
listener
- the new listener.public boolean getShowTitle()
true
.public void setShowTitle(boolean value)
true
.value
- whether the title should be drawnpublic boolean getShowDayNames()
true
.public void setShowDayNames(boolean value)
true
.value
- whether the title should be drawnpublic Function<Long,Integer> getDateToColor()
Function
which determines the color that is
used for each date in this instance. If the value returned by the function is
null
for some date, the default value for color will be used.
This can be used for example to render dates which are holidays in Red
.public void setDateToColor(Function<Long,Integer> dateToColor)
Function
which determines the color that is
used for each date in this instance. If the value returned by the function is
null
for some date, the default value for color will be used.
This can be used for example to render dates which are holidays in Red
.dateToColor
- a function which will determine what color to be used for different datespublic Procedure<CalendarCell> getCustomizationRule()
Procedure
which makes modifications
to a CalendarCell
after it is updated and/or
created.
For example, this modifications may include setting the foreground that is used by the cell
to Red
for cell which represent holidays.public void setCustomizationRule(Procedure<CalendarCell> customizationRule)
Procedure
which makes modifications
to a CalendarCell
after it is updated and/or
created.
For example, this modifications may include setting the foreground that is used by the cell
to Red
for cell which represent holidays.customizationRule
- a procedure which defines modification applied for a calendar cellpublic long getMinDate()
long
and represents the min date
that can be represented and/or selected by the calendar.
The default value is 0
, which means that there is no min date.public void setMinDate(long minDate)
minDate
- the new min dateIllegalArgumentException
- If the new min date is after the current max dategetMaxDate()
public long getMaxDate()
long
and represents the max date
that can be represented and/or selected by the calendar.
The default value is 0
, which means that there is no max date.public void setMaxDate(long maxDate)
maxDate
- the new max dateIllegalArgumentException
- If the new max date is before the current min dategetMinDate()
public boolean onTouchEvent(MotionEvent event)
onTouchEvent
in class View
public boolean onDown(MotionEvent event)
CalendarGestureManager
class.public void onShowPress(MotionEvent e)
CalendarGestureManager
class.public boolean onSingleTapUp(MotionEvent event)
CalendarGestureManager
class.public boolean onScroll(MotionEvent event, MotionEvent event2, float v, float v2)
CalendarGestureManager
class.public void onLongPress(MotionEvent event)
CalendarGestureManager
class.public boolean onFling(MotionEvent event1, MotionEvent event2, float velocity1, float velocity2)
CalendarGestureManager
class.public void beginUpdate()
public void beginUpdate(boolean suspendArrange)
suspendArrange
- true
will result in suspending the arrange as well, false
will not prevent the arrange.public void endUpdate()
public void endUpdate(boolean releaseArrange)
invalidateArrange()
followed by an invalidation.releaseArrange
- true
will cause the arrange to be performed before the invalidation,
false
will not cause arrange.public void invalidate()
invalidate
in class View
public boolean onSingleTapConfirmed(MotionEvent event)
CalendarGestureManager
class.public boolean onDoubleTap(MotionEvent event)
CalendarGestureManager
class.public boolean onDoubleTapEvent(MotionEvent event)
CalendarGestureManager
class.public boolean onScale(ScaleGestureDetector scaleGestureDetector)
CalendarGestureManager
class.public boolean onScaleBegin(ScaleGestureDetector scaleGestureDetector)
CalendarGestureManager
class.public void onScaleEnd(ScaleGestureDetector scaleGestureDetector)
CalendarGestureManager
class.public void changeDisplayMode(CalendarDisplayMode displayMode)
public void changeDisplayMode(CalendarDisplayMode displayMode, boolean animate)
Week
and Year
.displayMode
- the new display modeanimate
- whethersetDisplayMode(CalendarDisplayMode)
public CalendarDisplayMode getDisplayMode()
CalendarDisplayMode
.
The enumeration represents the period of dates that is visible at once on the calendar.
The default value is Month
, which means that the calendar shows one month.public void setDisplayMode(CalendarDisplayMode value)
CalendarDisplayMode
.
The enumeration represents the period of dates that is visible at once on the calendar.
The default value is Month
, which means that the calendar shows one month.
You can use
setOnDisplayModeChangedListener(com.telerik.widget.calendar.RadCalendarView.OnDisplayModeChangedListener)
and provide a listener which follows changes in the display mode.value
- the new display modesetOnDisplayModeChangedListener(com.telerik.widget.calendar.RadCalendarView.OnDisplayModeChangedListener)
public boolean isInOriginalSizeForAllModes()
false
. This means that when the display mode is changed to Week
,
the calendar will consume less space (that is the space consumed by one week only). If the
value is changed to true
, the calendar will maintain its original size.public void setInOriginalSizeForAllModes(boolean keepOriginalSizeInAllModes)
false
. This means that when the display mode is changed to Week
,
the calendar will consume less space (that is the space consumed by one week only). If the
value is changed to true
, the calendar will maintain its original size.keepOriginalSizeInAllModes
- whether the calendar will maintain its original size in week modepublic void setStretchInWeekMode(boolean stretchInWeekMode)
false
. This means that when the display mode is changed to Week
,
the calendar cells will consume less space (that is the space consumed by one week only). If the
value is changed to true
, the calendar cells will maintain its original size.stretchInWeekMode
- whether the calendar cell will maintain its original size in week modepublic boolean isYearModeCompact()
Year
. The default value is false
.
This means that when the display mode is changed to Year
, the calendar will render all
dates from the year. If the value is changed to true
,
the year view will show only the names of the months.public void setYearModeCompact(boolean yearModeCompact)
Year
. The default value is false
.
This means that when the display mode is changed to Year
, the calendar will render all
dates from the year. If the value is changed to true
,
the year view will show only the names of the months.yearModeCompact
- whether the months in year view will be drawn entirely or only by their namespublic Locale getLocale()
Locale
used by the calendar.
The locale is used for determining the names of the days and the months visualized
by this instance. The default locale is the one provided by the current device.public void setLocale(Locale locale)
Locale
to be used by the calendar.
The locale is used for determining the names of the days and the months visualized
by this instance. The default locale is the one provided by the current device.locale
- the new localepublic Calendar getCalendar()
Calendar
used by the calendar.
By default the calendar that is used is GregorianCalendar
.
If you want to use a different calendar set it through
setCalendar(java.util.Calendar)
.public void setCalendar(Calendar calendar)
Calendar
to be used by this instance.
By default the calendar that is used is GregorianCalendar
.calendar
- the new calendarpublic void updateFragments()
public void updateFragments(boolean force)
force
- if forced the fragments will be updated disregarding their current state.public void applyDayCellStyles(CalendarDayCell cell)
public void applyMonthCellStyles(CalendarMonthCell cell)