public class TimetableView
+extends android.widget.LinearLayout
+SimpleOperater
处理
+ 虽然这个类代码很多,但是都是属性设置,除了属性设置的方法:
+ showView()
+ changeWeek(int, boolean)
+ changeWeekOnly(int)
+ changeWeekForce(int)
+ updateView()
+ updateSlideView()
+ updateDateView()
+ updateView()
+
+ 文档参考 https://github.com/zfman/TimetableView/wiki/%E6%9C%80%E6%96%B0%E6%96%87%E6%A1%A3AbsOperater
,
+SimpleOperater
android.widget.LinearLayout.LayoutParams
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
android.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.OnCapturedPointerListener, 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.OnTouchListener
HORIZONTAL, SHOW_DIVIDER_BEGINNING, SHOW_DIVIDER_END, SHOW_DIVIDER_MIDDLE, SHOW_DIVIDER_NONE, VERTICAL
CLIP_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_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, 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, FOCUSABLE, FOCUSABLE_AUTO, 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, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, 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, NOT_FOCUSABLE, 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_NAVIGATION_BAR, 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
构造器和说明 | +
---|
TimetableView(android.content.Context context,
+ android.util.AttributeSet attrs)
+初始化
+ |
+
限定符和类型 | +方法和说明 | +
---|---|
TimetableView |
+alpha(float allAlpha)
+将三个透明度统一设置
+ |
+
TimetableView |
+alpha(float dateAlpha,
+ float slideAlpha,
+ float itemAlpha)
+透明度设置
+ |
+
TimetableView |
+callback(ISchedule.OnDateBuildListener onDateBuildListener)
+设置日期栏构建监听器
+ |
+
TimetableView |
+callback(ISchedule.OnFlaglayoutClickListener onFlaglayoutClickListener)
+设置旗标布局点击监听器
+ |
+
TimetableView |
+callback(ISchedule.OnItemBuildListener onItemBuildListener)
+设置课程项构建监听器
+ |
+
TimetableView |
+callback(ISchedule.OnItemClickListener onItemClickListener)
+设置Item点击监听器
+ |
+
TimetableView |
+callback(ISchedule.OnItemLongClickListener onItemLongClickListener)
+设置课程项长按监听器
+ |
+
TimetableView |
+callback(ISchedule.OnScrollViewBuildListener onScrollViewBuildListener)
+设置滚动布局构建监听器
+ |
+
TimetableView |
+callback(ISchedule.OnSlideBuildListener onSlideBuildListener)
+设置侧边栏构建监听器
+ |
+
TimetableView |
+callback(ISchedule.OnSpaceItemClickListener onSpaceItemClickListener)
+设置空白格子点击监听器,点击之后会出现一个旗标布局
+ |
+
TimetableView |
+callback(ISchedule.OnWeekChangedListener onWeekChangedListener)
+设置周次改变监听器
+ |
+
void |
+changeWeek(int week,
+ boolean isCurWeek)
+周次切换
+ |
+
void |
+changeWeekForce(int week)
+切换周次且修改为当前周
+ |
+
void |
+changeWeekOnly(int week)
+仅仅切换周次,不修改当前周
+ |
+
ScheduleColorPool |
+colorPool()
+获取颜色池
+ |
+
int |
+corner(boolean isThisWeek)
+获取课程角度
+ |
+
TimetableView |
+corner(int corner,
+ boolean isThisWeek)
+课程角度设置
+ |
+
TimetableView |
+cornerAll(int cornerValue)
+设置本周、非本周相同的弧度
+ |
+
java.lang.String |
+curTerm()
+获取当前学期
+ |
+
TimetableView |
+curTerm(java.lang.String curTerm)
+设置当前学期
+ |
+
int |
+curWeek()
+获取当前周
+ |
+
TimetableView |
+curWeek(int curWeek)
+设置当前周
+ |
+
TimetableView |
+curWeek(java.lang.String startTime)
+设置开学时间来计算当前周
+ |
+
TimetableView |
+data(java.util.List<Schedule> dataSource)
+设置数据源
+ |
+
java.util.List<Schedule> |
+dataSource()
+获取数据源
+ |
+
float |
+dateAlpha()
+获取日期栏透明度
+ |
+
int |
+dp2px(int dp)
+dp->px
+ |
+
int |
+flagBgcolor()
+获取旗标布局背景颜色
+ |
+
TimetableView |
+flagBgcolor(int color)
+设置旗标布局背景颜色
+ |
+
android.widget.LinearLayout |
+flagLayout()
+获取旗标布局
+ |
+
void |
+hideDateView()
+将日期栏设为隐藏状态
+ |
+
TimetableView |
+hideFlaglayout()
+隐藏旗标布局,立即生效
+ |
+
boolean |
+isShowFlaglayout()
+获取是否显示旗标布局
+ |
+
TimetableView |
+isShowFlaglayout(boolean isShowFlaglayout)
+设置是否显示旗标布局
+ |
+
boolean |
+isShowNotCurWeek()
+判断是否显示非本周课程
+ |
+
TimetableView |
+isShowNotCurWeek(boolean showNotCurWeek)
+设置是否显示非本周课程
+ |
+
boolean |
+isShowWeekends() |
+
TimetableView |
+isShowWeekends(boolean isShowWeekends)
+是否显示周末
+ |
+
float |
+itemAlpha()
+获取课程项透明度
+ |
+
int |
+itemHeight()
+获取课程项的高度
+ |
+
TimetableView |
+itemHeight(int itemHeightPx)
+设置课程项的高度
+ |
+
TimetableView |
+itemTextColor(int color,
+ boolean isThisWeek)
+课程项文本颜色
+ |
+
int |
+itemTextColorWithNotThis()
+获取非本周课程项文本颜色
+ |
+
int |
+itemTextColorWithThisWeek()
+获取本周课程项文本颜色
+ |
+
int |
+marLeft()
+获取左边距
+ |
+
TimetableView |
+marLeft(int marLeftPx)
+设置左边距值
+ |
+
int |
+marTop()
+获取上边距
+ |
+
TimetableView |
+marTop(int marTopPx)
+设置上边距值
+ |
+
int |
+maxSlideItem()
+获取最大节次
+ |
+
TimetableView |
+maxSlideItem(int maxSlideItem)
+设置最大节次
+ |
+
int |
+monthWidth()
+获取侧边栏宽度px
+ |
+
TimetableView |
+monthWidthDp(int monthWidthDp)
+设置侧边栏宽度dp
+ |
+
TimetableView |
+monthWidthPx(int monthWidthPx)
+设置侧边栏宽度px
+ |
+
ISchedule.OnDateBuildListener |
+onDateBuildListener()
+获取日期栏构建监听器
+ |
+
ISchedule.OnFlaglayoutClickListener |
+onFlaglayoutClickListener()
+获取旗标布局点击监听器
+ |
+
ISchedule.OnItemBuildListener |
+onItemBuildListener()
+获取Item构建监听器
+ |
+
ISchedule.OnItemClickListener |
+onItemClickListener()
+获取Item点击监听
+ |
+
ISchedule.OnItemLongClickListener |
+onItemLongClickListener()
+获取课程项长按监听器
+ |
+
ISchedule.OnScrollViewBuildListener |
+onScrollViewBuildListener()
+获取滚动布局构建监听器
+ |
+
ISchedule.OnSlideBuildListener |
+onSlideBuildListener()
+获取侧边栏构建监听
+ |
+
ISchedule.OnSpaceItemClickListener |
+onSpaceItemClickListener()
+获取空白格子点击监听器
+ |
+
ISchedule.OnWeekChangedListener |
+onWeekChangedListener()
+获取周次改变监听器
+ |
+
AbsOperater |
+operater() |
+
TimetableView |
+operater(AbsOperater operater) |
+
TimetableView |
+resetFlagBgcolor()
+重置旗标布局背景色
+ |
+
void |
+showDateView()
+将日期栏设为可见状态
+ |
+
TimetableView |
+showFlaglayout()
+显示旗标布局,立即生效
+ |
+
void |
+showView() |
+
float |
+slideAlpha()
+获取侧边栏透明度
+ |
+
TimetableView |
+source(java.util.List<? extends ScheduleEnable> dataSource)
+设置数据源
+ |
+
TimetableView |
+thisWeekCorner(int thisWeekCorner)
+设置本周课程的弧度
+ |
+
void |
+updateDateView()
+更新日期栏
+ |
+
void |
+updateFlaglayout()
+更新旗标布局的背景色
+ |
+
void |
+updateSlideView()
+侧边栏更新
+ |
+
void |
+updateView()
+等同于showView()
+ |
+
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getBaseline, getBaselineAlignedChildIndex, getDividerDrawable, getDividerPadding, getGravity, getOrientation, getShowDividers, getWeightSum, isBaselineAligned, isMeasureWithLargestChildEnabled, onDraw, onLayout, onMeasure, onRtlPropertiesChanged, setBaselineAligned, setBaselineAlignedChildIndex, setDividerDrawable, setDividerPadding, setGravity, setHorizontalGravity, setMeasureWithLargestChildEnabled, setOrientation, setShowDividers, setVerticalGravity, setWeightSum, shouldDelayChildPressedState
addChildrenForAccessibility, addFocusables, 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, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, 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, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAttachedToWindow, onCreateDrawableState, onDescendantInvalidated, onDetachedFromWindow, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addExtraDataToAccessibilityNodeInfo, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchStartTemporaryDetach, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, 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, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, keyboardNavigationClusterSearch, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAutofillHints, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, 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, setTooltipText, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch, requestFitSystemWindows, requestLayout
public TimetableView(android.content.Context context, + android.util.AttributeSet attrs)+
context
- attrs
- public TimetableView isShowWeekends(boolean isShowWeekends)+
isShowWeekends
- public boolean isShowWeekends()+
public AbsOperater operater()+
public TimetableView operater(AbsOperater operater)+
public TimetableView monthWidthDp(int monthWidthDp)+
monthWidthDp
- public TimetableView monthWidthPx(int monthWidthPx)+
monthWidthPx
- public int monthWidth()+
public TimetableView itemTextColor(int color, + boolean isThisWeek)+
color
- 颜色isThisWeek
- 是否本周,true:设置当前周文本颜色,false:设置非本周文本颜色public int itemTextColorWithThisWeek()+
public int itemTextColorWithNotThis()+
public float itemAlpha()+
public float slideAlpha()+
public float dateAlpha()+
public TimetableView alpha(float dateAlpha, + float slideAlpha, + float itemAlpha)+
dateAlpha
- 日期栏透明度slideAlpha
- 侧边栏透明度itemAlpha
- 课程项透明度public TimetableView alpha(float allAlpha)+
allAlpha
- 日期栏、侧边栏、课程项的透明度public TimetableView flagBgcolor(int color)+
color
- public TimetableView resetFlagBgcolor()+
public boolean isShowFlaglayout()+
public TimetableView isShowFlaglayout(boolean isShowFlaglayout)+
isShowFlaglayout
- public int flagBgcolor()+
public android.widget.LinearLayout flagLayout()+
public TimetableView callback(ISchedule.OnItemLongClickListener onItemLongClickListener)+
onItemLongClickListener
- public ISchedule.OnItemLongClickListener onItemLongClickListener()+
public TimetableView callback(ISchedule.OnDateBuildListener onDateBuildListener)+
onDateBuildListener
- public ISchedule.OnDateBuildListener onDateBuildListener()+
public ISchedule.OnWeekChangedListener onWeekChangedListener()+
public TimetableView callback(ISchedule.OnWeekChangedListener onWeekChangedListener)+
onWeekChangedListener
- public TimetableView callback(ISchedule.OnScrollViewBuildListener onScrollViewBuildListener)+
onScrollViewBuildListener
- public ISchedule.OnScrollViewBuildListener onScrollViewBuildListener()+
public TimetableView callback(ISchedule.OnItemBuildListener onItemBuildListener)+
onItemBuildListener
- public TimetableView callback(ISchedule.OnItemClickListener onItemClickListener)+
onItemClickListener
- public ISchedule.OnSlideBuildListener onSlideBuildListener()+
public TimetableView callback(ISchedule.OnSlideBuildListener onSlideBuildListener)+
onSlideBuildListener
- public TimetableView callback(ISchedule.OnSpaceItemClickListener onSpaceItemClickListener)+
public ISchedule.OnSpaceItemClickListener onSpaceItemClickListener()+
public TimetableView callback(ISchedule.OnFlaglayoutClickListener onFlaglayoutClickListener)+
onFlaglayoutClickListener
- public ISchedule.OnFlaglayoutClickListener onFlaglayoutClickListener()+
public TimetableView curWeek(int curWeek)+
curWeek
- 当前周public TimetableView curWeek(java.lang.String startTime)+
startTime
- 满足"yyyy-MM-dd HH:mm:ss"模式的字符串public int curWeek()+
public TimetableView curTerm(java.lang.String curTerm)+
curTerm
- public java.lang.String curTerm()+
public java.util.List<Schedule> dataSource()+
public TimetableView data(java.util.List<Schedule> dataSource)+
dataSource
- public TimetableView source(java.util.List<? extends ScheduleEnable> dataSource)+
dataSource
- public TimetableView maxSlideItem(int maxSlideItem)+
maxSlideItem
- 最大节次public int maxSlideItem()+
public ISchedule.OnItemBuildListener onItemBuildListener()+
public ISchedule.OnItemClickListener onItemClickListener()+
public TimetableView thisWeekCorner(int thisWeekCorner)+
thisWeekCorner
- 弧度public TimetableView cornerAll(int cornerValue)+
cornerValue
- 弧度public TimetableView corner(int corner, + boolean isThisWeek)+
corner
- 角度pxisThisWeek
- 是否本周上public int corner(boolean isThisWeek)+
isThisWeek
- 是否本周上public TimetableView isShowNotCurWeek(boolean showNotCurWeek)+
showNotCurWeek
- 如果为true,将显示非本周,否则隐藏非本周public boolean isShowNotCurWeek()+
public ScheduleColorPool colorPool()+
ScheduleColorPool
public int dp2px(int dp)+
dp
- public TimetableView marTop(int marTopPx)+
marTopPx
- public TimetableView marLeft(int marLeftPx)+
marLeftPx
- public TimetableView itemHeight(int itemHeightPx)+
itemHeightPx
- public int itemHeight()+
public int marLeft()+
public int marTop()+
public void updateView()+
showView()
public TimetableView hideFlaglayout()+
public TimetableView showFlaglayout()+
public void hideDateView()+
public void showDateView()+
public void updateDateView()+
public void updateSlideView()+
public void changeWeek(int week, + boolean isCurWeek)+
week
- 周次isCurWeek
- 是否强制设置为本周public void changeWeekOnly(int week)+
week
- public void changeWeekForce(int week)+
week
- public void updateFlaglayout()+
public void showView()+
public static interface ISchedule.OnDateBuildListener
+限定符和类型 | +方法和说明 | +
---|---|
android.view.View[] |
+getDateViews(android.view.LayoutInflater mInflate,
+ float monthWidth,
+ float perWidth,
+ int height)
+获取View数组
+ 被废弃,自v2.0.3起该方法无效
+ |
+
void |
+onHighLight()
+为日期栏设置高亮时回调
+ |
+
void |
+onInit(android.widget.LinearLayout layout,
+ float alpha)
+初始化方法
+ |
+
void |
+onUpdateDate(int curWeek,
+ int targetWeek)
+更新日期时回调
+ |
+
void onInit(android.widget.LinearLayout layout, + float alpha)+
layout
- 日期栏容器alpha
- 透明度android.view.View[] getDateViews(android.view.LayoutInflater mInflate, + float monthWidth, + float perWidth, + int height)+
mInflate
- 转换器monthWidth
- 月份宽度pxperWidth
- 日期每项宽度pxheight
- 默认的日期栏高度void onHighLight()+
void onUpdateDate(int curWeek, + int targetWeek)+
public static interface ISchedule.OnFlaglayoutClickListener
+限定符和类型 | +方法和说明 | +
---|---|
void |
+onFlaglayoutClick(int day,
+ int start)
+当旗标布局被点击时回调
+ |
+
public static interface ISchedule.OnItemBuildListener
+限定符和类型 | +方法和说明 | +
---|---|
java.lang.String |
+getItemText(Schedule schedule,
+ boolean isThisWeek)
+构建课程项的文本时回调.
+ |
+
void |
+onItemUpdate(android.widget.FrameLayout layout,
+ android.widget.TextView textView,
+ android.widget.TextView countTextView,
+ Schedule schedule,
+ android.graphics.drawable.GradientDrawable gd)
+课程项构建完成后回调.
+ |
+
java.lang.String getItemText(Schedule schedule, + boolean isThisWeek)+
schedule
- 该位置对应的课程实体isThisWeek
- 该课程是否是本周上void onItemUpdate(android.widget.FrameLayout layout, + android.widget.TextView textView, + android.widget.TextView countTextView, + Schedule schedule, + android.graphics.drawable.GradientDrawable gd)+
layout
- 课程项的帧布局textView
- 课程项的内容区域countTextView
- 课程项的角标schedule
- 课程实体gd
- 内容区域的背景是使用GradientDrawable来设置的,你可以二次设置public static interface ISchedule.OnItemClickListener
+限定符和类型 | +方法和说明 | +
---|---|
void |
+onItemClick(android.view.View v,
+ java.util.List<Schedule> scheduleList)
+当课程项被点击时回调
+ |
+
public static interface ISchedule.OnItemLongClickListener
+限定符和类型 | +方法和说明 | +
---|---|
void |
+onLongClick(android.view.View v,
+ int day,
+ int start)
+当课程项被点击时回调
+ |
+
public static interface ISchedule.OnScrollViewBuildListener
+限定符和类型 | +方法和说明 | +
---|---|
android.view.View |
+getScrollView(android.view.LayoutInflater mInflate)
+构建滚动布局时回调
+ |
+
public static interface ISchedule.OnSlideBuildListener
+android.view.View getView(int pos, + android.view.LayoutInflater inflater, + int itemHeight, + int marTop)+
pos
- 位置inflater
- 转换器itemHeight
- 课程项的高度marTop
- 课程项的marTop值void onInit(android.widget.LinearLayout layout, + float alpha)+
layout
- 日期栏容器alpha
- 透明度public static interface ISchedule.OnSpaceItemClickListener
+限定符和类型 | +方法和说明 | +
---|---|
void |
+onInit(android.widget.LinearLayout flagLayout,
+ int monthWidth,
+ int itemWidth,
+ int itemHeight,
+ int marTop,
+ int marLeft)
+初始化方法
+ |
+
void |
+onSpaceItemClick(int day,
+ int start)
+当课程项被点击时回调
+ |
+
void onSpaceItemClick(int day, + int start)+
day
- 表示周几,0:周一,6:周日start
- 表示点击空白格子的节次,1:第一节void onInit(android.widget.LinearLayout flagLayout, + int monthWidth, + int itemWidth, + int itemHeight, + int marTop, + int marLeft)+
flagLayout
- 一个指示器的布局monthWidth
- 月份列宽度itemWidth
- 课程项宽度,itemWidth:是包含了边距的,设置宽度时所以需要减去边距itemHeight
- 课程项高度marTop
- 外边距public static interface ISchedule.OnWeekChangedListener
+限定符和类型 | +方法和说明 | +
---|---|
void |
+onWeekChanged(int curWeek)
+当周次被改变时回调
+ |
+
public interface ISchedule
+限定符和类型 | +接口和说明 | +
---|---|
static interface |
+ISchedule.OnDateBuildListener
+日期构造监听器
+ |
+
static interface |
+ISchedule.OnFlaglayoutClickListener
+旗标布局点击监听器
+ |
+
static interface |
+ISchedule.OnItemBuildListener
+课程项构建时回调
+ |
+
static interface |
+ISchedule.OnItemClickListener
+课程项点击监听器
+ |
+
static interface |
+ISchedule.OnItemLongClickListener
+课程项长按事件监听器
+ |
+
static interface |
+ISchedule.OnScrollViewBuildListener
+滚动布局构建监听器
+ |
+
static interface |
+ISchedule.OnSlideBuildListener
+侧边栏构建监听器
+ |
+
static interface |
+ISchedule.OnSpaceItemClickListener
+空白格子点击监听器
+ |
+
static interface |
+ISchedule.OnWeekChangedListener
+周次改变监听器
+ |
+
public static interface IWeekView.OnWeekItemClickedListener
+限定符和类型 | +方法和说明 | +
---|---|
void |
+onWeekClicked(int week)
+当Item被点击时回调
+ |
+
public static interface IWeekView.OnWeekLeftClickedListener
+限定符和类型 | +方法和说明 | +
---|---|
void |
+onWeekLeftClicked()
+当"设置当前周"按钮被点击时回调
+ |
+
public interface IWeekView
+限定符和类型 | +接口和说明 | +
---|---|
static interface |
+IWeekView.OnWeekItemClickedListener
+WeekView的Item点击监听器
+ |
+
static interface |
+IWeekView.OnWeekLeftClickedListener
+WeekView的左侧(设置当前周)的点击监听器
+ |
+
public class OnDateBuildAapter +extends java.lang.Object +implements ISchedule.OnDateBuildListener+
限定符和类型 | +字段和说明 | +
---|---|
protected float |
+alpha |
+
protected int |
+background |
+
protected java.lang.String[] |
+dateArray |
+
protected android.widget.LinearLayout |
+layout |
+
protected android.widget.LinearLayout[] |
+layouts |
+
protected android.widget.TextView[] |
+textViews |
+
protected java.util.List<java.lang.String> |
+weekDates |
+
构造器和说明 | +
---|
OnDateBuildAapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
protected void |
+activeDateBackground(int weekDay) |
+
android.view.View[] |
+getDateViews(android.view.LayoutInflater mInflate,
+ float monthWidth,
+ float perWidth,
+ int height)
+获取View数组
+ 被废弃,自v2.0.3起该方法无效
+ |
+
java.lang.String[] |
+getStringArray()
+返回一个长度为8的数组,第0个位置为null
+ |
+
protected void |
+initDateBackground() |
+
protected android.view.View |
+onBuildDayLayout(android.view.LayoutInflater mInflate,
+ int pos,
+ int width,
+ int height) |
+
protected android.view.View |
+onBuildMonthLayout(android.view.LayoutInflater mInflate,
+ int width,
+ int height)
+构建月份,也就是日期栏的第一格.
+ |
+
void |
+onHighLight()
+为日期栏设置高亮时回调
+ |
+
void |
+onInit(android.widget.LinearLayout layout,
+ float alpha)
+初始化方法
+ |
+
void |
+onUpdateDate(int curWeek,
+ int targetWeek)
+更新日期时回调
+ |
+
OnDateBuildAapter |
+setBackground(int background) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected android.widget.TextView[] textViews+
protected android.widget.LinearLayout[] layouts+
protected int background+
protected float alpha+
protected java.lang.String[] dateArray+
protected java.util.List<java.lang.String> weekDates+
protected android.widget.LinearLayout layout+
public OnDateBuildAapter setBackground(int background)+
public void onInit(android.widget.LinearLayout layout, + float alpha)+
ISchedule.OnDateBuildListener
onInit
在接口中 ISchedule.OnDateBuildListener
layout
- 日期栏容器alpha
- 透明度public android.view.View[] getDateViews(android.view.LayoutInflater mInflate, + float monthWidth, + float perWidth, + int height)+
ISchedule.OnDateBuildListener
getDateViews
在接口中 ISchedule.OnDateBuildListener
mInflate
- 转换器monthWidth
- 月份宽度pxperWidth
- 日期每项宽度pxheight
- 默认的日期栏高度public void onHighLight()+
ISchedule.OnDateBuildListener
onHighLight
在接口中 ISchedule.OnDateBuildListener
public void onUpdateDate(int curWeek, + int targetWeek)+
ISchedule.OnDateBuildListener
onUpdateDate
在接口中 ISchedule.OnDateBuildListener
protected android.view.View onBuildMonthLayout(android.view.LayoutInflater mInflate, + int width, + int height)+
mInflate
- width
- 宽度height
- 默认高度protected android.view.View onBuildDayLayout(android.view.LayoutInflater mInflate, + int pos, + int width, + int height)+
public java.lang.String[] getStringArray()+
protected void initDateBackground()+
protected void activeDateBackground(int weekDay)+
public class OnFlaglayoutClickAdapter +extends java.lang.Object +implements ISchedule.OnFlaglayoutClickListener+
构造器和说明 | +
---|
OnFlaglayoutClickAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+onFlaglayoutClick(int day,
+ int start)
+当旗标布局被点击时回调
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void onFlaglayoutClick(int day, + int start)+
ISchedule.OnFlaglayoutClickListener
onFlaglayoutClick
在接口中 ISchedule.OnFlaglayoutClickListener
day
- 表示周几,0:周一,6:周日start
- 表示点击空白格子的节次,1:第一节public class OnItemBuildAdapter +extends java.lang.Object +implements ISchedule.OnItemBuildListener+
构造器和说明 | +
---|
OnItemBuildAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
java.lang.String |
+getItemText(Schedule schedule,
+ boolean isThisWeek)
+构建课程项的文本时回调.
+ |
+
void |
+onItemUpdate(android.widget.FrameLayout layout,
+ android.widget.TextView textView,
+ android.widget.TextView countTextView,
+ Schedule schedule,
+ android.graphics.drawable.GradientDrawable gd)
+课程项构建完成后回调.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String getItemText(Schedule schedule, + boolean isThisWeek)+
ISchedule.OnItemBuildListener
getItemText
在接口中 ISchedule.OnItemBuildListener
schedule
- 该位置对应的课程实体isThisWeek
- 该课程是否是本周上public void onItemUpdate(android.widget.FrameLayout layout, + android.widget.TextView textView, + android.widget.TextView countTextView, + Schedule schedule, + android.graphics.drawable.GradientDrawable gd)+
ISchedule.OnItemBuildListener
onItemUpdate
在接口中 ISchedule.OnItemBuildListener
layout
- 课程项的帧布局textView
- 课程项的内容区域countTextView
- 课程项的角标schedule
- 课程实体gd
- 内容区域的背景是使用GradientDrawable来设置的,你可以二次设置public class OnItemClickAdapter +extends java.lang.Object +implements ISchedule.OnItemClickListener+
构造器和说明 | +
---|
OnItemClickAdapter() |
+
public void onItemClick(android.view.View v, + java.util.List<Schedule> scheduleList)+
ISchedule.OnItemClickListener
onItemClick
在接口中 ISchedule.OnItemClickListener
scheduleList
- 该位置的所有课程public class OnItemLongClickAdapter +extends java.lang.Object +implements ISchedule.OnItemLongClickListener+
构造器和说明 | +
---|
OnItemLongClickAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+onLongClick(android.view.View v,
+ int day,
+ int start)
+当课程项被点击时回调
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void onLongClick(android.view.View v, + int day, + int start)+
ISchedule.OnItemLongClickListener
onLongClick
在接口中 ISchedule.OnItemLongClickListener
day
- 星期,1:周一,7:周日start
- 节次,从1开始public class OnScrollViewBuildAdapter +extends java.lang.Object +implements ISchedule.OnScrollViewBuildListener+
构造器和说明 | +
---|
OnScrollViewBuildAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
android.view.View |
+getScrollView(android.view.LayoutInflater mInflate)
+构建滚动布局时回调
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public android.view.View getScrollView(android.view.LayoutInflater mInflate)+
ISchedule.OnScrollViewBuildListener
getScrollView
在接口中 ISchedule.OnScrollViewBuildListener
public class OnSlideBuildAdapter +extends java.lang.Object +implements ISchedule.OnSlideBuildListener+
限定符和类型 | +字段和说明 | +
---|---|
protected float |
+alpha |
+
protected int |
+background |
+
protected int |
+textColor |
+
protected float |
+textSize |
+
protected java.lang.String[] |
+times |
+
protected int |
+timeTextColor |
+
protected float |
+timeTextSize |
+
构造器和说明 | +
---|
OnSlideBuildAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
java.lang.String[] |
+getTimes()
+获取时刻数组
+ |
+
android.view.View |
+getView(int pos,
+ android.view.LayoutInflater inflater,
+ int itemHeight,
+ int marTop)
+构建每项
+ |
+
void |
+onInit(android.widget.LinearLayout layout,
+ float alpha)
+初始化方法
+ |
+
OnSlideBuildAdapter |
+setBackground(int backgroundColor) |
+
OnSlideBuildAdapter |
+setTextColor(int textColor)
+设置节次文本颜色
+ |
+
OnSlideBuildAdapter |
+setTextSize(float textSize)
+设置节次文本的大小
+ |
+
OnSlideBuildAdapter |
+setTimes(java.lang.String[] times)
+设置时刻数组
+ |
+
OnSlideBuildAdapter |
+setTimeTextColor(int timeTextColor)
+设置节次时间的文本颜色
+ |
+
OnSlideBuildAdapter |
+setTimeTextSize(float timeTextSize)
+设置节次时间的文本大小
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected java.lang.String[] times+
protected int textColor+
protected float textSize+
protected float timeTextSize+
protected int timeTextColor+
protected int background+
protected float alpha+
public OnSlideBuildAdapter setTimes(java.lang.String[] times)+
times
- public OnSlideBuildAdapter setBackground(int backgroundColor)+
public java.lang.String[] getTimes()+
public OnSlideBuildAdapter setTextColor(int textColor)+
textColor
- 指定颜色public OnSlideBuildAdapter setTextSize(float textSize)+
textSize
- 指定字号public OnSlideBuildAdapter setTimeTextColor(int timeTextColor)+
timeTextColor
- 颜色public OnSlideBuildAdapter setTimeTextSize(float timeTextSize)+
timeTextSize
- 字号public android.view.View getView(int pos, + android.view.LayoutInflater inflater, + int itemHeight, + int marTop)+
ISchedule.OnSlideBuildListener
getView
在接口中 ISchedule.OnSlideBuildListener
pos
- 位置inflater
- 转换器itemHeight
- 课程项的高度marTop
- 课程项的marTop值public void onInit(android.widget.LinearLayout layout, + float alpha)+
ISchedule.OnSlideBuildListener
onInit
在接口中 ISchedule.OnSlideBuildListener
layout
- 日期栏容器alpha
- 透明度public class OnSpaceItemClickAdapter +extends java.lang.Object +implements ISchedule.OnSpaceItemClickListener+
限定符和类型 | +字段和说明 | +
---|---|
protected android.widget.LinearLayout |
+flagLayout |
+
protected int |
+itemHeight |
+
protected int |
+itemWidth |
+
protected int |
+marLeft |
+
protected int |
+marTop |
+
protected int |
+monthWidth |
+
构造器和说明 | +
---|
OnSpaceItemClickAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+onInit(android.widget.LinearLayout flagLayout,
+ int monthWidth,
+ int itemWidth,
+ int itemHeight,
+ int marTop,
+ int marLeft)
+初始化方法
+ |
+
void |
+onSpaceItemClick(int day,
+ int start)
+当课程项被点击时回调
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected android.widget.LinearLayout flagLayout+
protected int itemHeight+
protected int itemWidth+
protected int monthWidth+
protected int marTop+
protected int marLeft+
public void onSpaceItemClick(int day, + int start)+
ISchedule.OnSpaceItemClickListener
onSpaceItemClick
在接口中 ISchedule.OnSpaceItemClickListener
day
- 表示周几,0:周一,6:周日start
- 表示点击空白格子的节次,1:第一节public void onInit(android.widget.LinearLayout flagLayout, + int monthWidth, + int itemWidth, + int itemHeight, + int marTop, + int marLeft)+
ISchedule.OnSpaceItemClickListener
onInit
在接口中 ISchedule.OnSpaceItemClickListener
flagLayout
- 一个指示器的布局monthWidth
- 月份列宽度itemWidth
- 课程项宽度,itemWidth:是包含了边距的,设置宽度时所以需要减去边距itemHeight
- 课程项高度marTop
- 外边距public class OnWeekChangedAdapter +extends java.lang.Object +implements ISchedule.OnWeekChangedListener+
构造器和说明 | +
---|
OnWeekChangedAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+onWeekChanged(int curWeek)
+当周次被改变时回调
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void onWeekChanged(int curWeek)+
ISchedule.OnWeekChangedListener
onWeekChanged
在接口中 ISchedule.OnWeekChangedListener
curWeek
- 改变的周次,不一定是当前周,因为切换周次的时候有两种模式:
+ 仅仅切换周次、强制切换,前者不会更改当前周public class OnWeekItemClickedAdapter +extends java.lang.Object +implements IWeekView.OnWeekItemClickedListener+
构造器和说明 | +
---|
OnWeekItemClickedAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+onWeekClicked(int curWeek)
+当Item被点击时回调
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void onWeekClicked(int curWeek)+
IWeekView.OnWeekItemClickedListener
onWeekClicked
在接口中 IWeekView.OnWeekItemClickedListener
curWeek
- 选择的周次public class OnWeekLeftClickedAdapter +extends java.lang.Object +implements IWeekView.OnWeekLeftClickedListener+
构造器和说明 | +
---|
OnWeekLeftClickedAdapter() |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+onWeekLeftClicked()
+当"设置当前周"按钮被点击时回调
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void onWeekLeftClicked()+
IWeekView.OnWeekLeftClickedListener
onWeekLeftClicked
在接口中 IWeekView.OnWeekLeftClickedListener
接口 | +说明 | +
---|---|
ISchedule | +
+ 与Schedule有关的接口.
+ |
+
ISchedule.OnDateBuildListener | +
+ 日期构造监听器
+ |
+
ISchedule.OnFlaglayoutClickListener | +
+ 旗标布局点击监听器
+ |
+
ISchedule.OnItemBuildListener | +
+ 课程项构建时回调
+ |
+
ISchedule.OnItemClickListener | +
+ 课程项点击监听器
+ |
+
ISchedule.OnItemLongClickListener | +
+ 课程项长按事件监听器
+ |
+
ISchedule.OnScrollViewBuildListener | +
+ 滚动布局构建监听器
+ |
+
ISchedule.OnSlideBuildListener | +
+ 侧边栏构建监听器
+ |
+
ISchedule.OnSpaceItemClickListener | +
+ 空白格子点击监听器
+ |
+
ISchedule.OnWeekChangedListener | +
+ 周次改变监听器
+ |
+
IWeekView | +
+ WeekView的相关接口.
+ |
+
IWeekView.OnWeekItemClickedListener | +
+ WeekView的Item点击监听器
+ |
+
IWeekView.OnWeekLeftClickedListener | +
+ WeekView的左侧(设置当前周)的点击监听器
+ |
+
类 | +说明 | +
---|---|
OnDateBuildAapter | +
+ 日期栏的构建过程.
+ |
+
OnFlaglayoutClickAdapter | +
+ Created by Liu ZhuangFei on 2018/8/3.
+ |
+
OnItemBuildAdapter | +
+ Item构建监听器的默认实现.
+ |
+
OnItemClickAdapter | +
+ Item点击的默认实现.
+ |
+
OnItemLongClickAdapter | +
+ Created by Liu ZhuangFei on 2018/8/3.
+ |
+
OnScrollViewBuildAdapter | +
+ 滚动布局构建监听的默认实现
+ |
+
OnSlideBuildAdapter | +
+ 控件实现的一个可以显示时间的侧边栏适配器
+ Created by Liu ZhuangFei on 2018/6/18.
+ |
+
OnSpaceItemClickAdapter | +
+ Created by Liu ZhuangFei on 2018/8/3.
+ |
+
OnWeekChangedAdapter | ++ |
OnWeekItemClickedAdapter | +
+ WeekView的Item点击监听默认实现
+ |
+
OnWeekLeftClickedAdapter | +
+ WeekView的左侧按钮点击监听默认实现
+ |
+
构造器和说明 | +
---|
Schedule() |
+
Schedule(java.lang.String name,
+ java.lang.String room,
+ java.lang.String teacher,
+ java.util.List<java.lang.Integer> weekList,
+ int start,
+ int step,
+ int day,
+ int colorRandom) |
+
限定符和类型 | +方法和说明 | +
---|---|
int |
+compareTo(Schedule o) |
+
int |
+getColorRandom() |
+
int |
+getDay() |
+
java.util.Map<java.lang.String,java.lang.Object> |
+getExtras() |
+
java.lang.String |
+getName() |
+
java.lang.String |
+getRoom() |
+
int |
+getStart() |
+
int |
+getStep() |
+
java.lang.String |
+getTeacher() |
+
java.util.List<java.lang.Integer> |
+getWeekList() |
+
void |
+putExtras(java.lang.String key,
+ java.lang.Object val) |
+
void |
+setColorRandom(int colorRandom) |
+
void |
+setDay(int day) |
+
void |
+setExtras(java.util.Map<java.lang.String,java.lang.Object> map) |
+
void |
+setName(java.lang.String name) |
+
void |
+setRoom(java.lang.String room) |
+
void |
+setStart(int start) |
+
void |
+setStep(int step) |
+
void |
+setTeacher(java.lang.String teacher) |
+
void |
+setWeekList(java.util.List<java.lang.Integer> weekList) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Schedule(java.lang.String name, + java.lang.String room, + java.lang.String teacher, + java.util.List<java.lang.Integer> weekList, + int start, + int step, + int day, + int colorRandom)+
public Schedule()+
public java.util.Map<java.lang.String,java.lang.Object> getExtras()+
public void setExtras(java.util.Map<java.lang.String,java.lang.Object> map)+
public void putExtras(java.lang.String key, + java.lang.Object val)+
public java.lang.String getName()+
public void setName(java.lang.String name)+
public java.lang.String getRoom()+
public void setRoom(java.lang.String room)+
public java.lang.String getTeacher()+
public void setTeacher(java.lang.String teacher)+
public void setWeekList(java.util.List<java.lang.Integer> weekList)+
public java.util.List<java.lang.Integer> getWeekList()+
public int getStart()+
public void setStart(int start)+
public int getStep()+
public void setStep(int step)+
public int getDay()+
public void setDay(int day)+
public int getColorRandom()+
public void setColorRandom(int colorRandom)+
public class ScheduleColorPool
+extends java.lang.Object
+构造器和说明 | +
---|
ScheduleColorPool(android.content.Context context) |
+
限定符和类型 | +方法和说明 | +
---|---|
ScheduleColorPool |
+add(int... colorIds)
+在颜色池中添加一些自定义的颜色
+ |
+
ScheduleColorPool |
+addAll(java.util.Collection<? extends java.lang.Integer> ownColorPool)
+将指定集合中的颜色加入到颜色池中
+ |
+
ScheduleColorPool |
+clear()
+清空颜色池,清空默认颜色
+ |
+
int |
+getColor(int i)
+根据索引获取颜色,索引越界默认返回 Color.GRAY
+ |
+
int |
+getColorAuto(int i)
+使用模运算根据索引从颜色池中获取颜色,
+ 如果i<0,转换为正数,
+ 否则:重新计算索引j=i mod size
+ |
+
int |
+getColorAutoWithAlpha(int random,
+ float alpha)
+从颜色池中取指定透明度的颜色
+ |
+
java.util.List<java.lang.Integer> |
+getPoolInstance()
+得到颜色池的实例,即List集合
+ |
+
int |
+getUselessColor()
+获取非本周课程颜色
+ |
+
int |
+getUselessColorWithAlpha(float alpha)
+获取非本周课程颜色
+ |
+
ScheduleColorPool |
+reset()
+重置,先在池子里添加一些默认的课程项颜色
+ |
+
ScheduleColorPool |
+setUselessColor(int uselessColor)
+设置非本周课程颜色
+ |
+
int |
+size()
+颜色池的大小
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ScheduleColorPool(android.content.Context context)+
public int getUselessColor()+
public int getUselessColorWithAlpha(float alpha)+
public ScheduleColorPool setUselessColor(int uselessColor)+
uselessColor
- 非本周课程的颜色public java.util.List<java.lang.Integer> getPoolInstance()+
public int getColorAutoWithAlpha(int random, + float alpha)+
random
- alpha
- public int getColor(int i)+
i
- 索引public int getColorAuto(int i)+
i
- 索引public ScheduleColorPool addAll(java.util.Collection<? extends java.lang.Integer> ownColorPool)+
ownColorPool
- 集合public int size()+
public ScheduleColorPool clear()+
public ScheduleColorPool add(int... colorIds)+
colorIds
- 多个颜色public ScheduleColorPool reset()+
public interface ScheduleEnable
+限定符和类型 | +方法和说明 | +
---|---|
Schedule |
+getSchedule()
+获取Schedule
+ |
+
public class ScheduleSupport
+extends java.lang.Object
+构造器和说明 | +
---|
ScheduleSupport() |
+
限定符和类型 | +方法和说明 | +
---|---|
static Schedule |
+findRealSubject(int start,
+ int curWeek,
+ java.util.List<Schedule> scheduleList)
+返回index处的课程,注意他的真实位置可能并不是index
+ |
+
static java.util.List<Schedule> |
+findSubjects(Schedule subject,
+ java.util.List<Schedule> data)
+在data中查找与subject的start相同的课程集合
+ |
+
static java.util.List<Schedule> |
+fliterSchedule(java.util.List<Schedule> data,
+ int curWeek,
+ boolean isShowNotCurWeek)
+根据当前周过滤课程,获取本周有效的课程(忽略重叠的)
+ |
+
static java.util.List<Schedule> |
+getAllSubjectsWithDay(java.util.List<Schedule> scheduleList,
+ int day)
+获取某天的所有课程
+ |
+
static java.util.List<Schedule> |
+getColorReflect(java.util.List<Schedule> schedules)
+模拟分配颜色,将源数据的colorRandom属性赋值,
+ 然后根据该属性值在颜色池中查找颜色即可
+ |
+
static java.util.List<java.lang.String> |
+getDateStringFromWeek(int curWeek,
+ int targetWeek)
+根据需要算的周数和当前周数计算日期,
+ 用于周次切换时对日期的更新
+ |
+
static java.util.List<Schedule> |
+getHaveSubjectsWithDay(java.util.List<Schedule> scheduleList,
+ int curWeek,
+ int day)
+获取某天有课的课程
+ |
+
static int |
+getPx(android.content.Context context,
+ int dp)
+内部使用的是:context.getResources().getDimensionPixelSize(dp);
+ |
+
static java.util.List<java.lang.String> |
+getWeekDate()
+获取本周的周一-周日的所有日期
+ |
+
static boolean |
+isThisWeek(Schedule subject,
+ int cur_week)
+判断该课是否为本周的
+ |
+
static void |
+sortList(java.util.List<Schedule> data) |
+
static void |
+sortList(java.util.List<Schedule>[] data)
+按照上课节次排序
+ |
+
static java.util.List<Schedule>[] |
+splitSubjectWithDay(java.util.List<Schedule> dataSource)
+将源数据拆分为数组的七个元素,每个元素为一个集合,
+ 依次为周一-周日的课程集合
+ |
+
static int |
+timeTransfrom(java.lang.String startTime)
+根据开学时间计算当前周
+ |
+
static java.util.List<Schedule> |
+transform(java.util.List<? extends ScheduleEnable> dataSource)
+转换,将自定义类型转换为List
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.util.List<java.lang.String> getDateStringFromWeek(int curWeek, + int targetWeek)+
targetWeek
- 需要算的周数curWeek
- 当前周数public static java.util.List<java.lang.String> getWeekDate()+
public static int timeTransfrom(java.lang.String startTime)+
startTime
- 满足"yyyy-MM-dd HH:mm:ss"模式的字符串public static java.util.List<Schedule> getColorReflect(java.util.List<Schedule> schedules)+
schedules
- 源数据public static int getPx(android.content.Context context, + int dp)+
context
- dp
- public static java.util.List<Schedule> transform(java.util.List<? extends ScheduleEnable> dataSource)+
dataSource
- 源数据集合public static java.util.List<Schedule>[] splitSubjectWithDay(java.util.List<Schedule> dataSource)+
dataSource
- 源数据public static java.util.List<Schedule> getHaveSubjectsWithDay(java.util.List<Schedule> scheduleList, + int curWeek, + int day)+
scheduleList
- 数据集合curWeek
- 当前周,以1开始day
- 星期几,0:周一,1:周二,依次类推..周日:6public static java.util.List<Schedule> getAllSubjectsWithDay(java.util.List<Schedule> scheduleList, + int day)+
scheduleList
- 数据集合day
- 星期几,0:周一,1:周二,依次类推..周日:6public static java.util.List<Schedule> findSubjects(Schedule subject, + java.util.List<Schedule> data)+
subject
- data
- public static Schedule findRealSubject(int start, + int curWeek, + java.util.List<Schedule> scheduleList)+
curWeek
- public static void sortList(java.util.List<Schedule>[] data)+
data
- public static void sortList(java.util.List<Schedule> data)+
public static boolean isThisWeek(Schedule subject, + int cur_week)+
cur_week
- public interface WeekViewEnable<T>
+限定符和类型 | +方法和说明 | +
---|---|
T |
+curWeek(int curWeek)
+设置当前周
+ |
+
T |
+data(java.util.List<Schedule> scheduleList)
+设置数据源
+ |
+
java.util.List<Schedule> |
+dataSource()
+获取数据源
+ |
+
T |
+isShow(boolean isShow)
+设置控件的可见性
+ |
+
boolean |
+isShowing()
+判断该控件是否显示
+ |
+
int |
+itemCount()
+获取项数
+ |
+
T |
+itemCount(int count)
+设置项数
+ |
+
T |
+showView()
+初次构建时调用,显示周次选择布局
+ |
+
T |
+source(java.util.List<? extends ScheduleEnable> list)
+设置数据源
+ |
+
T |
+updateView()
+当前周被改变后可以调用该方式修正一下底部的文本
+ |
+
T curWeek(int curWeek)+
curWeek
- T itemCount(int count)+
count
- int itemCount()+
T source(java.util.List<? extends ScheduleEnable> list)+
list
- java.util.List<Schedule> dataSource()+
T showView()+
T updateView()+
T isShow(boolean isShow)+
isShow
- true:显示,false:隐藏boolean isShowing()+
接口 | +说明 | +
---|---|
ScheduleEnable | +
+ 该接口定义数据转换的规范,
+ 用户自定义课程实体类需要实现该接口以及实现其中的转换方法,
+ 在设置数据源时可以使用自定义的课程实体,但是必须实现该接口
+ |
+
WeekViewEnable<T> | +
+ 如果需要自定义周次选择栏,请实现该接口,
+ 它仅仅提供一个规范,可用可不用
+ Created by Liu ZhuangFei on 2018/7/28.
+ |
+
类 | +说明 | +
---|---|
Schedule | +
+ 课程实体类
++ 1.增加了extras,可以保存一些自己需要的东西 |
+
ScheduleColorPool | +
+ 颜色池,管理课程项可挑选的颜色
+ |
+
ScheduleSupport | +
+ 课程表的工具包,主要提供几个便捷的方法
+ |
+
public abstract class AbsOperater
+extends java.lang.Object
+构造器和说明 | +
---|
AbsOperater() |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+changeWeek(int week,
+ boolean isCurWeek) |
+
android.widget.LinearLayout |
+getDateLayout() |
+
android.widget.LinearLayout |
+getFlagLayout() |
+
void |
+init(android.content.Context context,
+ android.util.AttributeSet attrs,
+ TimetableView view) |
+
void |
+setWeekendsVisiable(boolean isShow) |
+
void |
+showView() |
+
void |
+updateDateView() |
+
void |
+updateSlideView() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void init(android.content.Context context, + android.util.AttributeSet attrs, + TimetableView view)+
public void showView()+
public void updateDateView()+
public void updateSlideView()+
public void changeWeek(int week, + boolean isCurWeek)+
public android.widget.LinearLayout getFlagLayout()+
public android.widget.LinearLayout getDateLayout()+
public void setWeekendsVisiable(boolean isShow)+
public class SimpleOperater +extends AbsOperater+
构造器和说明 | +
---|
SimpleOperater() |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+changeWeek(int week,
+ boolean isCurWeek)
+切换周次
+ |
+
protected boolean |
+checkPosition(int day,
+ int start)
+判断位置是否有课
+ |
+
android.widget.LinearLayout |
+getDateLayout() |
+
android.widget.LinearLayout |
+getFlagLayout()
+获取旗标布局
+ |
+
protected float |
+getPerWidth() |
+
void |
+init(android.content.Context context,
+ android.util.AttributeSet attrs,
+ TimetableView view) |
+
protected void |
+initAttr(android.util.AttributeSet attrs)
+获取自定义属性
+ |
+
protected void |
+initPanel()
+初始化panel并为panel设置事件监听
+ |
+
void |
+newSlideView(android.widget.LinearLayout slidelayout)
+构建侧边栏
+ |
+
protected void |
+onPanelClicked(android.view.View view,
+ float y)
+点击panel时的事件响应
+ |
+
void |
+setWeekendsVisiable(boolean isShow)
+设置周末的可见性
+ |
+
void |
+showView()
+绘制课程表
+ |
+
void |
+updateDateView()
+更新日期栏
+ |
+
void |
+updateSlideView()
+侧边栏更新
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void init(android.content.Context context, + android.util.AttributeSet attrs, + TimetableView view)+
init
在类中 AbsOperater
protected void initAttr(android.util.AttributeSet attrs)+
attrs
- public android.widget.LinearLayout getDateLayout()+
getDateLayout
在类中 AbsOperater
public android.widget.LinearLayout getFlagLayout()+
getFlagLayout
在类中 AbsOperater
public void newSlideView(android.widget.LinearLayout slidelayout)+
slidelayout
- 侧边栏的容器protected void onPanelClicked(android.view.View view, + float y)+
protected boolean checkPosition(int day, + int start)+
day
- start
- protected void initPanel()+
public void showView()+
showView
在类中 AbsOperater
public void changeWeek(int week, + boolean isCurWeek)+
changeWeek
在类中 AbsOperater
week
- isCurWeek
- 是否强制设置为当前周protected float getPerWidth()+
public void updateDateView()+
updateDateView
在类中 AbsOperater
public void updateSlideView()+
updateSlideView
在类中 AbsOperater
public void setWeekendsVisiable(boolean isShow)+
setWeekendsVisiable
在类中 AbsOperater
类 | +说明 | +
---|---|
AbsOperater | +
+ 抽象的业务逻辑
+ Created by Liu ZhuangFei on 2018/9/2.
+ |
+
SimpleOperater | +
+ 课表业务操作者,TimetableView中只涉及属性的设置,方法的具体实现在这里.
+ |
+
类 | +说明 | +
---|---|
TimetableView | +
+ 课程表控件,该类主要负责属性的设置,业务逻辑由
+SimpleOperater 处理
+ 虽然这个类代码很多,但是都是属性设置,除了属性设置的方法:
+ TimetableView.showView()
+ TimetableView.changeWeek(int, boolean)
+ TimetableView.changeWeekOnly(int)
+ TimetableView.changeWeekForce(int)
+ TimetableView.updateView()
+ TimetableView.updateSlideView()
+ TimetableView.updateDateView()
+ TimetableView.updateView()
+
+ 文档参考 https://github.com/zfman/TimetableView/wiki/%E6%9C%80%E6%96%B0%E6%96%87%E6%A1%A3 |
+
public class ColorUtils
+extends java.lang.Object
+构造器和说明 | +
---|
ColorUtils() |
+
限定符和类型 | +方法和说明 | +
---|---|
static int |
+alphaColor(int color,
+ float alpha)
+合成指定颜色、指定不透明度的颜色,
+ 0:完全透明,1:不透明
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class ScreenUtils
+extends java.lang.Object
+构造器和说明 | +
---|
ScreenUtils() |
+
限定符和类型 | +方法和说明 | +
---|---|
static int |
+dip2px(android.content.Context context,
+ float dpValue)
+dp转换为px
+ |
+
static int |
+getHeightInDp(android.content.Context context)
+获取屏幕的高度Dp
+ |
+
static int |
+getHeightInPx(android.content.Context context)
+获取屏幕的高度Px
+ |
+
static int |
+getWidthInDp(android.content.Context context)
+获取屏幕的宽度Dp
+ |
+
static int |
+getWidthInPx(android.content.Context context)
+获取屏幕的宽度Px
+ |
+
static int |
+px2dip(android.content.Context context,
+ float pxValue)
+px转换为dp
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int getHeightInPx(android.content.Context context)+
context
- public static final int getWidthInPx(android.content.Context context)+
context
- public static final int getHeightInDp(android.content.Context context)+
context
- public static final int getWidthInDp(android.content.Context context)+
context
- public static int dip2px(android.content.Context context, + float dpValue)+
context
- 上下文dpValue
- dppublic static int px2dip(android.content.Context context, + float pxValue)+
context
- 上下文pxValue
- px类 | +说明 | +
---|---|
ColorUtils | +
+ Created by Liu ZhuangFei on 2018/7/25.
+ |
+
ScreenUtils | +
+ 尺寸工具类
+ |
+
public class PerWeekView
+extends android.view.View
+android.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.OnCapturedPointerListener, 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.OnTouchListener
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, 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, FOCUSABLE, FOCUSABLE_AUTO, 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, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, 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, NOT_FOCUSABLE, 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_NAVIGATION_BAR, 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
构造器和说明 | +
---|
PerWeekView(android.content.Context context) |
+
PerWeekView(android.content.Context context,
+ android.util.AttributeSet attrs) |
+
限定符和类型 | +方法和说明 | +
---|---|
void |
+drawPoint(android.graphics.Canvas canvas,
+ int x,
+ int y,
+ int radius,
+ android.graphics.Paint p)
+画点
+ |
+
int[][] |
+getArray()
+根据此数据源分析出一个二维数组.
+ |
+
java.util.List<Schedule> |
+getDataSource()
+获取数据源
+ |
+
android.graphics.Paint |
+getGrayPaint()
+获取暗色的画笔
+ |
+
android.graphics.Paint |
+getLightPaint()
+获取亮色的画笔
+ |
+
protected void |
+onDraw(android.graphics.Canvas canvas) |
+
protected void |
+onSizeChanged(int w,
+ int h,
+ int oldw,
+ int oldh) |
+
PerWeekView |
+setData(java.util.List<Schedule> list,
+ int curWeek)
+设置数据源
+ |
+
PerWeekView |
+setGrayColor(int grayColor)
+设置暗色
+ |
+
PerWeekView |
+setLightColor(int lightColor)
+设置亮色
+ |
+
PerWeekView |
+setRadiusInDp(int radiusDp)
+设置半径Dp
+ |
+
PerWeekView |
+setRadiusInPx(int radiusPx)
+设置半径Px
+ |
+
PerWeekView |
+setSource(java.util.List<? extends ScheduleEnable> list,
+ int curWeek)
+设置数据源
+ |
+
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEvent, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, drawableHotspotChanged, drawableStateChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityClassName, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, 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, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, keyboardNavigationClusterSearch, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onAttachedToWindow, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDetachedFromWindow, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onMeasure, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onResolvePointerIcon, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreDefaultFocus, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAutofillHints, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, 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, setTooltipText, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public PerWeekView(android.content.Context context)+
public PerWeekView(android.content.Context context, + android.util.AttributeSet attrs)+
public android.graphics.Paint getLightPaint()+
public android.graphics.Paint getGrayPaint()+
public PerWeekView setLightColor(int lightColor)+
lightColor
- 亮色public PerWeekView setGrayColor(int grayColor)+
grayColor
- 暗色public java.util.List<Schedule> getDataSource()+
public PerWeekView setSource(java.util.List<? extends ScheduleEnable> list, + int curWeek)+
list
- curWeek
- public PerWeekView setData(java.util.List<Schedule> list, + int curWeek)+
list
- curWeek
- public PerWeekView setRadiusInPx(int radiusPx)+
radiusPx
- 半径public PerWeekView setRadiusInDp(int radiusDp)+
radiusDp
- 半径protected void onSizeChanged(int w, + int h, + int oldw, + int oldh)+
onSizeChanged
在类中 android.view.View
protected void onDraw(android.graphics.Canvas canvas)+
onDraw
在类中 android.view.View
public int[][] getArray()+
public void drawPoint(android.graphics.Canvas canvas, + int x, + int y, + int radius, + android.graphics.Paint p)+
canvas
- x
- 圆心xy
- 圆心yradius
- 半径p
- 画笔public class WeekView +extends android.widget.LinearLayout +implements WeekViewEnable<WeekView>+
android.widget.LinearLayout.LayoutParams
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
android.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.OnCapturedPointerListener, 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.OnTouchListener
HORIZONTAL, SHOW_DIVIDER_BEGINNING, SHOW_DIVIDER_END, SHOW_DIVIDER_MIDDLE, SHOW_DIVIDER_NONE, VERTICAL
CLIP_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_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, 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, FOCUSABLE, FOCUSABLE_AUTO, 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, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, 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, NOT_FOCUSABLE, 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_NAVIGATION_BAR, 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
构造器和说明 | +
---|
WeekView(android.content.Context context) |
+
WeekView(android.content.Context context,
+ android.util.AttributeSet attrs) |
+
限定符和类型 | +方法和说明 | +
---|---|
WeekView |
+callback(IWeekView.OnWeekItemClickedListener onWeekItemClickedListener)
+设置Item点击监听
+ |
+
WeekView |
+callback(IWeekView.OnWeekLeftClickedListener onWeekLeftClickedListener)
+设置左侧按钮点击监听
+ |
+
WeekView |
+curWeek(int curWeek)
+设置当前周
+ |
+
WeekView |
+data(java.util.List<Schedule> scheduleList)
+设置数据源
+ |
+
java.util.List<Schedule> |
+dataSource()
+获取数据源
+ |
+
WeekView |
+hideLeftLayout()
+隐藏左侧设置当前周的控件
+ |
+
WeekView |
+isShow(boolean isShow)
+设置控件的可见性
+ |
+
boolean |
+isShowing()
+判断该控件是否显示
+ |
+
int |
+itemCount()
+获取项数
+ |
+
WeekView |
+itemCount(int count)
+设置项数
+ |
+
IWeekView.OnWeekItemClickedListener |
+onWeekItemClickedListener()
+获取Item点击监听
+ |
+
IWeekView.OnWeekLeftClickedListener |
+onWeekLeftClickedListener()
+获取左侧按钮点击监听
+ |
+
void |
+resetBackground()
+重置背景色
+ |
+
WeekView |
+showView()
+初次构建时调用,显示周次选择布局
+ |
+
WeekView |
+source(java.util.List<? extends ScheduleEnable> list)
+设置数据源
+ |
+
WeekView |
+updateView()
+当前周被改变后可以调用该方式修正一下底部的文本
+ |
+
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getBaseline, getBaselineAlignedChildIndex, getDividerDrawable, getDividerPadding, getGravity, getOrientation, getShowDividers, getWeightSum, isBaselineAligned, isMeasureWithLargestChildEnabled, onDraw, onLayout, onMeasure, onRtlPropertiesChanged, setBaselineAligned, setBaselineAlignedChildIndex, setDividerDrawable, setDividerPadding, setGravity, setHorizontalGravity, setMeasureWithLargestChildEnabled, setOrientation, setShowDividers, setVerticalGravity, setWeightSum, shouldDelayChildPressedState
addChildrenForAccessibility, addFocusables, 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, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, 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, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAttachedToWindow, onCreateDrawableState, onDescendantInvalidated, onDetachedFromWindow, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addExtraDataToAccessibilityNodeInfo, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchStartTemporaryDetach, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, 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, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, keyboardNavigationClusterSearch, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAutofillHints, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, 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, setTooltipText, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch, requestFitSystemWindows, requestLayout
public WeekView(android.content.Context context)+
public WeekView(android.content.Context context, + android.util.AttributeSet attrs)+
public IWeekView.OnWeekItemClickedListener onWeekItemClickedListener()+
public WeekView callback(IWeekView.OnWeekItemClickedListener onWeekItemClickedListener)+
onWeekItemClickedListener
- public IWeekView.OnWeekLeftClickedListener onWeekLeftClickedListener()+
public WeekView callback(IWeekView.OnWeekLeftClickedListener onWeekLeftClickedListener)+
onWeekLeftClickedListener
- public WeekView curWeek(int curWeek)+
curWeek
在接口中 WeekViewEnable<WeekView>
curWeek
- public WeekView itemCount(int count)+
itemCount
在接口中 WeekViewEnable<WeekView>
count
- public int itemCount()+
WeekViewEnable
itemCount
在接口中 WeekViewEnable<WeekView>
public WeekView source(java.util.List<? extends ScheduleEnable> list)+
source
在接口中 WeekViewEnable<WeekView>
list
- public WeekView data(java.util.List<Schedule> scheduleList)+
data
在接口中 WeekViewEnable<WeekView>
scheduleList
- public java.util.List<Schedule> dataSource()+
dataSource
在接口中 WeekViewEnable<WeekView>
public WeekView showView()+
showView
在接口中 WeekViewEnable<WeekView>
public WeekView updateView()+
updateView
在接口中 WeekViewEnable<WeekView>
public void resetBackground()+
public WeekView hideLeftLayout()+
public WeekView isShow(boolean isShow)+
isShow
在接口中 WeekViewEnable<WeekView>
isShow
- true:显示,false:隐藏public boolean isShowing()+
isShowing
在接口中 WeekViewEnable<WeekView>
类 | +说明 | +
---|---|
PerWeekView | +
+ 周次选择栏的每项自定义View,表示某周的有课情况.
+ |
+
WeekView | +
+ 周次选择栏自定义View.
+ |
+
概览 页面是此 API 文档的首页, 提供了所有程序包的列表及其概要。此页面也可能包含这些程序包的总体说明。
+每个程序包都有一个页面, 其中包含它的类和接口的列表及其概要。此页面可以包含六个类别:
+每个类, 接口, 嵌套类和嵌套接口都有各自的页面。其中每个页面都由三部分 (类/接口说明, 概要表, 以及详细的成员说明) 组成:
+每个概要条目都包含该项目的详细说明的第一句。概要条目按字母顺序排列, 而详细说明则按其在源代码中出现的顺序排列。这样保持了程序员所建立的逻辑分组。
+每个注释类型都有各自的页面, 其中包含以下部分:
+每个枚举都有各自的页面, 其中包含以下部分:
+对于所有程序包, 有一个类分层结构页面, 以及每个程序包的分层结构。每个分层结构页面都包含类的列表和接口的列表。从java.lang.Object
开始, 按继承结构对类进行排列。接口不从java.lang.Object
继承。
已过时的 API 页面列出了所有已过时的 API。一般由于进行了改进并且通常提供了替代的 API, 所以建议不要使用已过时的 API。在将来的实现过程中, 可能会删除已过时的 API。
+索引 包含按字母顺序排列的所有类, 接口, 构造器, 方法和字段的列表。
+这些链接使您可以转至下一个或上一个类, 接口, 程序包或相关页面。
+这些链接用于显示和隐藏 HTML 框架。所有页面均具有有框架和无框架两种显示方式。
+所有类链接显示所有类和接口 (除了非静态嵌套类型)。
+每个可序列化或可外部化的类都有其序列化字段和方法的说明。此信息对重新实现者有用, 而对使用 API 的开发者则没有什么用处。尽管导航栏中没有链接, 但您可以通过下列方式获取此信息: 转至任何序列化类, 然后单击类说明的 "另请参阅" 部分中的 "序列化表格"。
+常量字段值页面列出了静态最终字段及其值。
+SimpleOperater
处理
+ 虽然这个类代码很多,但是都是属性设置,除了属性设置的方法:
+ TimetableView.showView()
+ TimetableView.changeWeek(int, boolean)
+ TimetableView.changeWeekOnly(int)
+ TimetableView.changeWeekForce(int)
+ TimetableView.updateView()
+ TimetableView.updateSlideView()
+ TimetableView.updateDateView()
+ TimetableView.updateView()
+
+ 文档参考 https://github.com/zfman/TimetableView/wiki/%E6%9C%80%E6%96%B0%E6%96%87%E6%A1%A3+ + diff --git a/docs/v2.0.3/overview-summary.html b/docs/v2.0.3/overview-summary.html new file mode 100644 index 0000000..b3c2150 --- /dev/null +++ b/docs/v2.0.3/overview-summary.html @@ -0,0 +1,166 @@ + + + + + + +
程序包 | +说明 | +
---|---|
com.zhuangfei.timetable | +
+ TimetableView是课表控件,主要是操作该对象进而完成对属性设置以及对视图的创建、更新
+ |
+
com.zhuangfei.timetable.listener | +
+ 该包中存放接口以及默认的实现类
+ |
+
com.zhuangfei.timetable.model | +
+ 该包存放与Schedule有关的模型类
+ |
+
com.zhuangfei.timetable.operater | +
+ 该包存放与ScheduleOperater有关的类
+ |
+
com.zhuangfei.timetable.utils | +
+ 该包存放一些全局的工具方法
+ |
+
com.zhuangfei.timetable.view | +
+ 该包存放控件实现的自定义View
+ |
+
java.lang.String name+
java.lang.String room+
java.lang.String teacher+
java.util.List<E> weekList+
int start+
int step+
int day+
int colorRandom+
java.util.Map<K,V> extras+