Class ChannelListView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource
public final class ChannelListView extends FrameLayout
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceChannelListView.UserClickListenerpublic interfaceChannelListView.ChannelClickListenerpublic interfaceChannelListView.ChannelLongClickListenerpublic interfaceChannelListView.ChannelOptionVisibilityPredicatepublic interfaceChannelListView.ChannelOptionIconProviderpublic interfaceChannelListView.EndReachedListenerpublic interfaceChannelListView.ChannelListUpdateListenerCalled when the updated list is about to be displayed in the channels RecyclerView.
public interfaceChannelListView.ChannelListItemPredicatePredicate object with a filter condition for ChannelListItem. Used to filter a list of ChannelListItem before applying it to ChannelListView.
public interfaceChannelListView.ErrorEventHandlerpublic interfaceChannelListView.SwipeListener
-
Constructor Summary
Constructors Constructor Description ChannelListView(Context context)ChannelListView(Context context, AttributeSet attrs)ChannelListView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
Method Summary
Modifier and Type Method Description final RecyclerViewgetRecyclerView()Returns the inner RecyclerView that is used to display a list of channel list items. final LinearLayoutManagergetLayoutManager()Returns LinearLayoutManager associated with the inner RecyclerView. final BooleanisAdapterInitialized()final UnitsetEmptyStateView(View view, FrameLayout.LayoutParams layoutParams)final UnitsetEmptyStateView(View view)final UnitsetLoadingView(View view, FrameLayout.LayoutParams layoutParams)final UnitsetLoadingView(View view)final UnitsetItemSeparator(@DrawableRes() Integer drawableResource)Uses the drawableResource as the separator for list items. final UnitsetItemSeparatorHeight(Integer dp)final UnitsetShouldDrawItemSeparatorOnLastItem(Boolean shouldDrawOnLastItem)final UnitsetViewHolderFactory(ChannelListItemViewHolderFactory factory)Allows clients to set a custom implementation of ChannelListItemViewHolderFactory. final UnitsetChannelItemClickListener(ChannelListView.ChannelClickListener listener)Allows clients to set a click listener for all channel list items. final UnitsetChannelLongClickListener(ChannelListView.ChannelLongClickListener listener)Allows clients to set a long-click listener for all channel list items. final UnitsetUserClickListener(ChannelListView.UserClickListener listener)Allows clients to set a click listener to be notified of user click events. final UnitsetChannelDeleteClickListener(ChannelListView.ChannelClickListener listener)Allows clients to set a click listener to be notified of delete clicks via channel actions. final UnitsetMoreOptionsClickListener(ChannelListView.ChannelClickListener listener)Allows clients to set a click listener to be notified of "more options" clicks in ViewHolder items. final UnitsetIsMoreOptionsVisible(Function1<Channel, Boolean> isMoreOptionsVisible)Allows clients to set a visibility controller for the "more options" icon in ViewHolder items. final UnitsetIsDeleteOptionVisible(Function1<Channel, Boolean> isDeleteOptionVisible)Allows clients to set a visibility controller for the "delete option" icon in ViewHolder items. final UnitsetMoreOptionsIconProvider(Function1<Channel, Drawable> getMoreOptionsIcon)Allows clients to override a "more options" icon in ViewHolder items. final UnitsetDeleteOptionIconProvider(Function1<Channel, Drawable> getDeleteOptionIcon)Allows clients to override a "delete option" icon in ViewHolder items. final UnitsetChannelInfoClickListener(ChannelListView.ChannelClickListener listener)Allows a client to set a click listener to be notified of "channel info" clicks in the "more options" menu. final UnitsetChannelLeaveClickListener(ChannelListView.ChannelClickListener listener)Allows a client to set a click listener to be notified of "leave channel" clicks in the "more options" menu. final UnitsetSwipeListener(ChannelListView.SwipeListener listener)Allows a client to set a swipe listener to be notified of swipe details in order to take action. final UnitsetOnEndReachedListener(ChannelListView.EndReachedListener listener)final UnitsetChannelListUpdateListener(ChannelListView.ChannelListUpdateListener listener)Allow a client to set a listener to be notified when the updated channel list is about to be displayed. final UnitsetChannelListItemPredicate(ChannelListView.ChannelListItemPredicate channelListItemPredicate)Allows a client to set a ChannelListItemPredicate to filter ChannelListItems before they are drawn. final UnitsetErrorEventHandler(ChannelListView.ErrorEventHandler handler)final UnitshowError(ChannelListViewModel.ErrorEvent errorEvent)final UnitsetChannels(List<ChannelListItem> channels)final UnithideLoadingView()final UnitshowLoadingView()final UnitsetPaginationEnabled(Boolean enabled)final BooleanhasChannels()-
Methods inherited from class android.view.View
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, autofill, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearViewTranslationCallback, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findOnBackInvokedDispatcher, findViewById, findViewWithTag, focusSearch, forceHasOverlappingRendering, forceLayout, generateDisplayHash, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAllowedHandwritingDelegatePackageName, getAllowedHandwritingDelegatorPackageName, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, 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, getHandwritingBoundsOffsetBottom, getHandwritingBoundsOffsetLeft, getHandwritingBoundsOffsetRight, getHandwritingBoundsOffsetTop, getHandwritingDelegatorCallback, 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, 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, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityDataSensitive, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isAutoHandwritingEnabled, isClickable, isContextClickable, isCredential, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHandwritingDelegate, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onRtlPropertiesChanged, onScreenStateChanged, onScrollCaptureSearch, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPivot, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDataSensitive, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAllowedHandwritingDelegatePackage, setAllowedHandwritingDelegatorPackage, setAlpha, setAnimation, setAnimationMatrix, setAutoHandwritingEnabled, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHandwritingBoundsOffsets, setHandwritingDelegatorCallback, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setIsCredential, setIsHandwritingDelegate, 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, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw -
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findOnBackInvokedDispatcherForChild, findViewsWithText, focusSearch, focusableViewAvailable, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onDescendantInvalidated, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout -
Methods inherited from class android.widget.FrameLayout
generateLayoutParams, getAccessibilityClassName, getConsiderGoneChildrenWhenMeasuring, getMeasureAllChildren, setForegroundGravity, setMeasureAllChildren, shouldDelayChildPressedState -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ChannelListView
ChannelListView(Context context)
-
ChannelListView
ChannelListView(Context context, AttributeSet attrs)
-
ChannelListView
ChannelListView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
-
Method Detail
-
getRecyclerView
final RecyclerView getRecyclerView()
Returns the inner RecyclerView that is used to display a list of channel list items.
- Returns:
The inner RecyclerView with channels.
-
getLayoutManager
final LinearLayoutManager getLayoutManager()
Returns LinearLayoutManager associated with the inner RecyclerView.
- Returns:
LinearLayoutManager associated with the inner RecyclerView
-
isAdapterInitialized
final Boolean isAdapterInitialized()
- Returns:
if the list and its adapter are initialized.
-
setEmptyStateView
@JvmOverloads() final Unit setEmptyStateView(View view, FrameLayout.LayoutParams layoutParams)
- Parameters:
view- Will be added to the view hierarchy of ChannelListView and managed by it.layoutParams- Defines how the view will be situated inside its container ViewGroup.
-
setEmptyStateView
@JvmOverloads() final Unit setEmptyStateView(View view)
- Parameters:
view- Will be added to the view hierarchy of ChannelListView and managed by it.
-
setLoadingView
@JvmOverloads() final Unit setLoadingView(View view, FrameLayout.LayoutParams layoutParams)
- Parameters:
view- Will be added to the view hierarchy of ChannelListView and managed by it.layoutParams- Defines how the view will be situated inside its container ViewGroup.
-
setLoadingView
@JvmOverloads() final Unit setLoadingView(View view)
- Parameters:
view- Will be added to the view hierarchy of ChannelListView and managed by it.
-
setItemSeparator
final Unit setItemSeparator(@DrawableRes() Integer drawableResource)
Uses the drawableResource as the separator for list items.
- Parameters:
drawableResource- The drawable used as a separator.
-
setItemSeparatorHeight
final Unit setItemSeparatorHeight(Integer dp)
-
setShouldDrawItemSeparatorOnLastItem
final Unit setShouldDrawItemSeparatorOnLastItem(Boolean shouldDrawOnLastItem)
-
setViewHolderFactory
final Unit setViewHolderFactory(ChannelListItemViewHolderFactory factory)
Allows clients to set a custom implementation of ChannelListItemViewHolderFactory.
- Parameters:
factory- The custom factory to be used when generating item view holders.
-
setChannelItemClickListener
final Unit setChannelItemClickListener(ChannelListView.ChannelClickListener listener)
Allows clients to set a click listener for all channel list items.
- Parameters:
listener- The callback to be invoked on channel item click.
-
setChannelLongClickListener
final Unit setChannelLongClickListener(ChannelListView.ChannelLongClickListener listener)
Allows clients to set a long-click listener for all channel list items.
- Parameters:
listener- The callback to be invoked on channel long click.
-
setUserClickListener
final Unit setUserClickListener(ChannelListView.UserClickListener listener)
Allows clients to set a click listener to be notified of user click events.
- Parameters:
listener- The listener to be invoked when a user click event occurs.
-
setChannelDeleteClickListener
final Unit setChannelDeleteClickListener(ChannelListView.ChannelClickListener listener)
Allows clients to set a click listener to be notified of delete clicks via channel actions. or view holder swipe menu
- Parameters:
listener- The callback to be invoked when delete is clicked.
-
setMoreOptionsClickListener
final Unit setMoreOptionsClickListener(ChannelListView.ChannelClickListener listener)
Allows clients to set a click listener to be notified of "more options" clicks in ViewHolder items.
- Parameters:
listener- The callback to be invoked when "more options" is clicked.
-
setIsMoreOptionsVisible
final Unit setIsMoreOptionsVisible(Function1<Channel, Boolean> isMoreOptionsVisible)
Allows clients to set a visibility controller for the "more options" icon in ViewHolder items.
- Parameters:
isMoreOptionsVisible- The callback to be invoked when the visibility of "more options" gets checked.
-
setIsDeleteOptionVisible
final Unit setIsDeleteOptionVisible(Function1<Channel, Boolean> isDeleteOptionVisible)
Allows clients to set a visibility controller for the "delete option" icon in ViewHolder items.
- Parameters:
isDeleteOptionVisible- The callback to be invoked when the visibility of "delete option" gets checked.
-
setMoreOptionsIconProvider
final Unit setMoreOptionsIconProvider(Function1<Channel, Drawable> getMoreOptionsIcon)
Allows clients to override a "more options" icon in ViewHolder items.
- Parameters:
getMoreOptionsIcon- Provides icon for a "more options".
-
setDeleteOptionIconProvider
final Unit setDeleteOptionIconProvider(Function1<Channel, Drawable> getDeleteOptionIcon)
Allows clients to override a "delete option" icon in ViewHolder items.
- Parameters:
getDeleteOptionIcon- Provides icon for delete option.
-
setChannelInfoClickListener
final Unit setChannelInfoClickListener(ChannelListView.ChannelClickListener listener)
Allows a client to set a click listener to be notified of "channel info" clicks in the "more options" menu.
- Parameters:
listener- The callback to be invoked when "channel info" is clicked.
-
setChannelLeaveClickListener
final Unit setChannelLeaveClickListener(ChannelListView.ChannelClickListener listener)
Allows a client to set a click listener to be notified of "leave channel" clicks in the "more options" menu.
- Parameters:
listener- The callback to be invoked when "leave channel" is clicked.
-
setSwipeListener
final Unit setSwipeListener(ChannelListView.SwipeListener listener)
Allows a client to set a swipe listener to be notified of swipe details in order to take action.
- Parameters:
listener- The set of functions to be invoked during a swipe's lifecycle.
-
setOnEndReachedListener
final Unit setOnEndReachedListener(ChannelListView.EndReachedListener listener)
-
setChannelListUpdateListener
final Unit setChannelListUpdateListener(ChannelListView.ChannelListUpdateListener listener)
Allow a client to set a listener to be notified when the updated channel list is about to be displayed.
- Parameters:
listener- The callback to be invoked when the new channel list that is about to be displayed.
-
setChannelListItemPredicate
final Unit setChannelListItemPredicate(ChannelListView.ChannelListItemPredicate channelListItemPredicate)
Allows a client to set a ChannelListItemPredicate to filter ChannelListItems before they are drawn.
- Parameters:
channelListItemPredicate- Predicate used to filter the list of ChannelListItem.
-
setErrorEventHandler
final Unit setErrorEventHandler(ChannelListView.ErrorEventHandler handler)
-
showError
final Unit showError(ChannelListViewModel.ErrorEvent errorEvent)
-
setChannels
final Unit setChannels(List<ChannelListItem> channels)
-
hideLoadingView
final Unit hideLoadingView()
-
showLoadingView
final Unit showLoadingView()
-
setPaginationEnabled
final Unit setPaginationEnabled(Boolean enabled)
-
hasChannels
final Boolean hasChannels()
-
-
-
-