Package tv.mycujoo.mclsplayercore.widget
Class MCLSTimeBar
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.accessibility.AccessibilityEventSource,com.google.android.exoplayer2.ui.TimeBar
public final class MCLSTimeBar extends View implements TimeBar
-
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerDEFAULT_BAR_HEIGHT_DPpublic final static IntegerDEFAULT_TOUCH_TARGET_HEIGHT_DPpublic final static IntegerDEFAULT_AD_MARKER_WIDTH_DPpublic final static IntegerDEFAULT_SCRUBBER_ENABLED_SIZE_DPpublic final static IntegerDEFAULT_SCRUBBER_DISABLED_SIZE_DPpublic final static IntegerDEFAULT_SCRUBBER_DRAGGED_SIZE_DPpublic final static IntegerDEFAULT_PLAYED_COLORpublic final static IntegerDEFAULT_UNPLAYED_COLORpublic final static IntegerDEFAULT_BUFFERED_COLORpublic final static IntegerDEFAULT_SCRUBBER_COLORpublic final static IntegerDEFAULT_AD_MARKER_COLORpublic final static IntegerDEFAULT_PLAYED_AD_MARKER_COLOR
-
Constructor Summary
Constructors Constructor Description MCLSTimeBar(Context context, AttributeSet attrs, Integer defStyleAttr, AttributeSet timebarAttrs)MCLSTimeBar(Context context, AttributeSet attrs, Integer defStyleAttr)MCLSTimeBar(Context context, AttributeSet attrs)MCLSTimeBar(Context context)
-
Method Summary
Modifier and Type Method Description final UnitsetPlayedColor(@ColorInt() Integer playedColor)Sets the color for the portion of the time bar representing media before the playback position. final UnitsetScrubberColor(@ColorInt() Integer scrubberColor)Sets the color for the scrubber handle. final UnitsetBufferedColor(@ColorInt() Integer bufferedColor)Sets the color for the portion of the time bar after the current played position up to the current buffered position. final UnitsetUnplayedColor(@ColorInt() Integer unplayedColor)Sets the color for the portion of the time bar after the current played position. final UnitsetAdMarkerColor(@ColorInt() Integer adMarkerColor)Sets the color for unplayed ad markers. final UnitsetPlayedAdMarkerColor(@ColorInt() Integer playedAdMarkerColor)Sets the color for played ad markers. final UnitsetTimelineMarkerPositionListener(TimelineMarkerPosition listener)UnitaddListener(TimeBar.OnScrubListener listener)UnitremoveListener(TimeBar.OnScrubListener listener)UnitsetKeyTimeIncrement(Long time)UnitsetKeyCountIncrement(Integer count)UnitsetPosition(Long position)UnitsetBufferedPosition(Long bufferedPosition)UnitsetDuration(Long duration)LonggetPreferredUpdateDelay()UnitsetAdGroupTimesMs(LongArray adGroupTimesMs, BooleanArray playedAdGroups, Integer adGroupCount)final UnitaddTimeLineHighlight(PointOfInterest poi)final UnitclearTimeLineMarker()UnitsetEnabled(Boolean enabled)UnitonDraw(Canvas canvas)BooleanonTouchEvent(MotionEvent event)BooleanonKeyDown(Integer keyCode, KeyEvent event)UnitjumpDrawablesToCurrentState()UnitonRtlPropertiesChanged(Integer layoutDirection)UnitonInitializeAccessibilityEvent(AccessibilityEvent event)UnitonInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)BooleanperformAccessibilityAction(Integer action, Bundle args)-
Methods inherited from class android.view.View
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, addTouchables, animate, announceForAccessibility, autofill, autofill, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearFocus, clearViewTranslationCallback, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEvent, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, drawableHotspotChanged, findFocus, findOnBackInvokedDispatcher, findViewById, findViewWithTag, findViewsWithText, focusSearch, forceHasOverlappingRendering, forceLayout, gatherTransparentRegion, generateDisplayHash, getAccessibilityClassName, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getOverlay, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getPreferKeepClearRects, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasTransientState, hasWindowFocus, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isAutoHandwritingEnabled, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onResolvePointerIcon, onScreenStateChanged, onScrollCaptureSearch, onStartTemporaryDetach, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPivot, restoreDefaultFocus, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAlpha, setAnimation, setAnimationMatrix, setAutoHandwritingEnabled, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPreferKeepClear, setPreferKeepClearRects, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setWindowInsetsAnimationCallback, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MCLSTimeBar
MCLSTimeBar(Context context, AttributeSet attrs, Integer defStyleAttr, AttributeSet timebarAttrs)
-
MCLSTimeBar
MCLSTimeBar(Context context, AttributeSet attrs, Integer defStyleAttr)
-
MCLSTimeBar
MCLSTimeBar(Context context, AttributeSet attrs)
-
MCLSTimeBar
MCLSTimeBar(Context context)
-
-
Method Detail
-
setPlayedColor
final Unit setPlayedColor(@ColorInt() Integer playedColor)
Sets the color for the portion of the time bar representing media before the playback position.
- Parameters:
playedColor- The color for the portion of the time bar representing media before the playback position.
-
setScrubberColor
final Unit setScrubberColor(@ColorInt() Integer scrubberColor)
Sets the color for the scrubber handle.
- Parameters:
scrubberColor- The color for the scrubber handle.
-
setBufferedColor
final Unit setBufferedColor(@ColorInt() Integer bufferedColor)
Sets the color for the portion of the time bar after the current played position up to the current buffered position.
- Parameters:
bufferedColor- The color for the portion of the time bar after the current played position up to the current buffered position.
-
setUnplayedColor
final Unit setUnplayedColor(@ColorInt() Integer unplayedColor)
Sets the color for the portion of the time bar after the current played position.
- Parameters:
unplayedColor- The color for the portion of the time bar after the current played position.
-
setAdMarkerColor
final Unit setAdMarkerColor(@ColorInt() Integer adMarkerColor)
Sets the color for unplayed ad markers.
- Parameters:
adMarkerColor- The color for unplayed ad markers.
-
setPlayedAdMarkerColor
final Unit setPlayedAdMarkerColor(@ColorInt() Integer playedAdMarkerColor)
Sets the color for played ad markers.
- Parameters:
playedAdMarkerColor- The color for played ad markers.
-
setTimelineMarkerPositionListener
final Unit setTimelineMarkerPositionListener(TimelineMarkerPosition listener)
-
addListener
Unit addListener(TimeBar.OnScrubListener listener)
-
removeListener
Unit removeListener(TimeBar.OnScrubListener listener)
-
setKeyTimeIncrement
Unit setKeyTimeIncrement(Long time)
-
setKeyCountIncrement
Unit setKeyCountIncrement(Integer count)
-
setPosition
Unit setPosition(Long position)
-
setBufferedPosition
Unit setBufferedPosition(Long bufferedPosition)
-
setDuration
Unit setDuration(Long duration)
-
getPreferredUpdateDelay
Long getPreferredUpdateDelay()
-
setAdGroupTimesMs
Unit setAdGroupTimesMs(LongArray adGroupTimesMs, BooleanArray playedAdGroups, Integer adGroupCount)
-
addTimeLineHighlight
final Unit addTimeLineHighlight(PointOfInterest poi)
-
clearTimeLineMarker
final Unit clearTimeLineMarker()
-
setEnabled
Unit setEnabled(Boolean enabled)
-
onTouchEvent
Boolean onTouchEvent(MotionEvent event)
-
jumpDrawablesToCurrentState
Unit jumpDrawablesToCurrentState()
-
onRtlPropertiesChanged
Unit onRtlPropertiesChanged(Integer layoutDirection)
-
onInitializeAccessibilityEvent
Unit onInitializeAccessibilityEvent(AccessibilityEvent event)
-
onInitializeAccessibilityNodeInfo
Unit onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
-
performAccessibilityAction
Boolean performAccessibilityAction(Integer action, Bundle args)
-
-
-
-