Class MessageListView
-
- 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 MessageListView extends ConstraintLayout
MessageListView renders a list of messages and extends the RecyclerView The most common customizations are
Disabling Reactions
Disabling Threads
Customizing the click and longCLick (via the adapter)
The list_item_message template to use (perhaps, multiple ones...?)
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description MessageListView(Context context)MessageListView(Context context, AttributeSet attrs)MessageListView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
Method Summary
Modifier and Type Method Description final UnitshowMessageOptionsDialog(FragmentManager fragmentManager, Message message, List<MessageOptionItem> messageOptionItems, Function2<Message, String, Unit> reactionClickListener, Function1<MessageAction, Unit> optionClickListener)Show message options dialog for the given set of message options. final Unitinit(Channel channel)Initializes the message list view with the Channel object. final UnitsetOwnCapabilities(Set<String> ownCapabilities)Setter method for own capabilities which dictate which parts of the UI are enabled or disabled for the current user in the given channel. final RecyclerViewgetRecyclerView()Returns the inner RecyclerView that is used to display a list of message list items. final UnitsetLoadingMore(Boolean loadingMore)Used to indicate that the message list is loading more messages. final UnitscrollToMessage(Message message)Scrolls the list to the target message and highlights it. final UnitupdateChannel(Channel channel)Updates the channel object used by the message list and initializes adapter if it's not initialized yet. final UnitscrollToBottom()Scrolls the message list to the bottom. final UnitsetCustomLinearLayoutManager(LinearLayoutManager layoutManager)Set a custom layout manager for MessageListView. final UnitsetCustomItemAnimator(RecyclerView.ItemAnimator itemAnimator)Set a custom item animator for MessageListView. final UnitsetLoadingView(View view, FrameLayout.LayoutParams layoutParams)Sets the view to be displayed when the message list is loading. final UnitsetLoadingView(View view)Sets the view to be displayed when the message list is loading. final UnitshowLoadingView()Shows the loading view. final UnithideLoadingView()Hides the loading view. final UnitshouldRequestMessagesAtBottom(Boolean shouldRequest)Enables fetch for messages at the bottom. final UnitsetEmptyStateView(View view, FrameLayout.LayoutParams layoutParams)Sets the view to be displayed when the message list is empty. final UnitsetEmptyStateView(View view)Sets the view to be displayed when the message list is empty. final UnitshowEmptyStateView()Shows the empty view. final UnithideEmptyStateView()Hides the empty view. final UnitshowError(MessageListController.ErrorEvent errorEvent)Shows a error for one of the reasons defined in MessageListController.ErrorEvent. final UnitsetNewMessagesBehaviour(MessageListView.NewMessagesBehaviour newMessagesBehaviour)Used to control whether the message list is scrolled to the bottom when new messages arrive or the unread count badge is incremented instead. final UnitsetScrollToBottomButtonEnabled(Boolean scrollToBottomButtonEnabled)Enables or disables the scroll to bottom button. final UnitsetEditMessageEnabled(Boolean enabled)Enables or disables the message editing feature. final UnitsetDeleteMessageEnabled(Boolean enabled)Enables or disables the message deleting feature. final UnitsetDeleteMessageConfirmationEnabled(Boolean enabled)Enables or disables the message delete confirmation showing. final UnitsetCopyMessageEnabled(Boolean enabled)Enables or disables the message copy feature. final UnitsetMessageFlagEnabled(Boolean enabled)Enables or disables the message flagging feature. final UnitsetReactionsEnabled(Boolean enabled)Enables or disables the message reactions feature. final UnitsetThreadsEnabled(Boolean enabled)Enables or disables the message threading feature. final UnitsetRepliesEnabled(Boolean enabled)Enables or disables the message threading feature. final UnitsetMessageViewHolderFactory(MessageListItemViewHolderFactory messageListItemViewHolderFactory)Allows clients to set a custom implementation of MessageListItemViewHolderFactory. final UnitsetMessageBackgroundFactory(MessageBackgroundFactory messageBackgroundFactory)Allows clients to set a custom implementation of MessageBackgroundFactory. final UnitsetMessageOptionItemsFactory(MessageOptionItemsFactory messageOptionItemsFactory)Allows clients to set a custom implementation of MessageOptionItemsFactory. final UnitsetMessageDateFormatter(DateFormatter messageDateFormatter)Allows clients to set a custom implementation of DateFormatter to format the message date. final UnitsetShowAvatarPredicate(MessageListView.ShowAvatarPredicate showAvatarPredicate)Used to control the visibility of the user avatar for a particular message list item. final UnitdisplayNewMessages(MessageListItemWrapper messageListItemWrapper)Shows the message list items. final UnitsetMessageListItemPredicate(MessageListView.MessageListItemPredicate messageListItemPredicate)Allows applying a filter condition to the message list before it is rendered. final UnitsetMessageItemTransformer(MessageListView.MessageListItemTransformer messageListItemTransformer)Allows to transform the message list data before it is rendered on the screen. final UnitsetAttachmentFactoryManager(AttachmentFactoryManager attachmentFactoryManager)Allows clients to set an instance of AttachmentFactoryManager that holds a list of custom attachment factories. final UnithandleFlagMessageResult(Result<Flag> result)final MessageListViewStylerequireStyle()Returns an instance of MessageListViewStyle associated with this instance of MessageListView. final BooleanisAdapterInitialized()final UnitsetMessageClickListener(MessageListView.MessageClickListener messageClickListener)Sets the message click listener to be used by MessageListView. final UnitsetOnMessageClickListener(MessageListView.OnMessageClickListener listener)Sets the message click listener to be used by MessageListView. final UnitsetMessageLongClickListener(MessageListView.MessageLongClickListener messageLongClickListener)Sets the message long click listener to be used by MessageListView. final UnitsetOnMessageLongClickListener(MessageListView.OnMessageLongClickListener listener)Sets the message long click listener to be used by MessageListView. final UnitsetModeratedMessageLongClickListener(MessageListView.ModeratedMessageLongClickListener moderatedMessageLongClickListener)Sets the moderated message long click listener to be used by MessageListView. final UnitsetOnModeratedMessageLongClickListener(MessageListView.OnModeratedMessageLongClickListener listener)Sets the moderated message long click listener to be used by MessageListView. final UnitsetMessageRetryListener(MessageListView.MessageRetryListener messageRetryListener)Sets the message retry listener to be used by MessageListView. final UnitsetOnMessageRetryListener(MessageListView.OnMessageRetryListener listener)Sets the message retry listener to be used by MessageListView. final UnitsetThreadClickListener(MessageListView.ThreadClickListener threadClickListener)Sets the thread click listener to be used by MessageListView. final UnitsetOnThreadClickListener(MessageListView.OnThreadClickListener listener)Sets the thread click listener to be used by MessageListView. final UnitsetAttachmentClickListener(MessageListView.AttachmentClickListener attachmentClickListener)Sets the attachment click listener to be used by MessageListView. final UnitsetOnAttachmentClickListener(MessageListView.OnAttachmentClickListener listener)Sets the attachment click listener to be used by MessageListView. final UnitsetAttachmentDownloadClickListener(MessageListView.AttachmentDownloadClickListener attachmentDownloadClickListener)Sets the attachment download click listener to be used by MessageListView. final UnitsetOnAttachmentDownloadClickListener(MessageListView.OnAttachmentDownloadClickListener listener)Sets the attachment download click listener to be used by MessageListView. final UnitsetReactionViewClickListener(MessageListView.ReactionViewClickListener reactionViewClickListener)Sets the reaction view click listener to be used by MessageListView. final UnitsetOnReactionViewClickListener(MessageListView.OnReactionViewClickListener listener)Sets the reaction view click listener to be used by MessageListView. final UnitsetUserClickListener(MessageListView.UserClickListener userClickListener)Sets the user click listener to be used by MessageListView. final UnitsetOnUserClickListener(MessageListView.OnUserClickListener listener)Sets the user click listener to be used by MessageListView. final UnitsetLinkClickListener(MessageListView.LinkClickListener linkClickListener)Sets the link click listener to be used by MessageListView. final UnitsetOnLinkClickListener(MessageListView.OnLinkClickListener listener)Sets the link click listener to be used by MessageListView. final UnitsetEnterThreadListener(MessageListView.EnterThreadListener enterThreadListener)Sets the thread click listener to be used by MessageListView. final UnitsetOnEnterThreadListener(MessageListView.OnEnterThreadListener listener)Sets the thread click listener to be used by MessageListView. final UnitsetUserReactionClickListener(MessageListView.UserReactionClickListener userReactionClickListener)Sets the click listener to be used when a reaction left by a user is clicked on the message options overlay. final UnitsetOnUserReactionClickListener(MessageListView.OnUserReactionClickListener listener)Sets the click listener to be used when a reaction left by a user is clicked on the message options overlay. final UnitsetReplyMessageClickListener(MessageListView.ReplyMessageClickListener replyMessageClickListener)Sets the click listener to be used when a message that is a reply is clicked. final UnitsetOnReplyMessageClickListener(MessageListView.OnReplyMessageClickListener listener)Sets the click listener to be used when a message that is a reply is clicked. final UnitsetEndRegionReachedHandler(MessageListView.EndRegionReachedHandler endRegionReachedHandler)Sets the handler used when the end region is reached. final UnitsetBottomEndRegionReachedHandler(MessageListView.BottomEndRegionReachedHandler bottomEndRegionReachedHandler)Sets the handler used when the bottom end region is reached. final UnitsetLastMessageReadHandler(MessageListView.LastMessageReadHandler lastMessageReadHandler)Sets the handler used when the last message is read. final UnitsetMessageEditHandler(MessageListView.MessageEditHandler messageEditHandler)Sets the handler used to let the message input know when we are editing a message. final UnitsetMessageDeleteHandler(MessageListView.MessageDeleteHandler messageDeleteHandler)Sets the handler used when the the message is going to be deleted. final UnitsetThreadStartHandler(MessageListView.ThreadStartHandler threadStartHandler)Sets the handler used when a new thread for the message is started. final UnitsetMessageFlagHandler(MessageListView.MessageFlagHandler messageFlagHandler)Sets the handler used when the message is going to be flagged. final UnitsetFlagMessageResultHandler(MessageListView.FlagMessageResultHandler flagMessageResultHandler)Sets the handler used to handle flag message result. final UnitsetMessagePinHandler(MessageListView.MessagePinHandler messagePinHandler)Sets the handler used to handle when the message is going to be pinned. final UnitsetMessageMarkAsUnreadHandler(MessageListView.MessageMarkAsUnreadHandler messageMarkAsUnreadHandler)Sets the handler used to handle when the message is going to be marked as read. final UnitsetMessageUnpinHandler(MessageListView.MessageUnpinHandler messageUnpinHandler)Sets the handler used to handle when the message is going to be unpinned. final UnitsetGiphySendHandler(MessageListView.GiphySendHandler giphySendHandler)Sets the handler used when giphy action is going to be performed. final UnitsetMessageRetryHandler(MessageListView.MessageRetryHandler messageRetryHandler)Sets the handler used when the failed message is going to be retried. final UnitsetMessageReactionHandler(MessageListView.MessageReactionHandler messageReactionHandler)Sets the handler used when a reaction for the message is going to be send. final UnitsetCustomActionHandler(MessageListView.CustomActionHandler customActionHandler)Set the handler used when the custom action is going to be executed. final UnitsetMessageReplyHandler(MessageListView.MessageReplyHandler messageReplyHandler)Sets the handler used when the message is going to be replied in the channel. final UnitsetAttachmentDownloadHandler(MessageListView.AttachmentDownloadHandler attachmentDownloadHandler)Sets the handler used when the attachment is going to be downloaded. final UnitsetConfirmDeleteMessageHandler(MessageListView.ConfirmDeleteMessageHandler confirmDeleteMessageHandler)Sets the handler used to confirm that the message is going to be deleted. final UnitsetConfirmFlagMessageHandler(MessageListView.ConfirmFlagMessageHandler confirmFlagMessageHandler)Sets the handler used to confirm that the message is going to be flagged. final UnitsetAttachmentReplyOptionClickHandler(AttachmentGalleryActivity.AttachmentReplyOptionHandler handler)Sets the handler used when replying to an attachment from the gallery screen. final UnitsetAttachmentShowInChatOptionClickHandler(AttachmentGalleryActivity.AttachmentShowInChatOptionHandler handler)Sets the handler used when navigating to a message from the gallery screen. final UnitsetDownloadOptionHandler(AttachmentGalleryActivity.AttachmentDownloadOptionHandler handler)Sets the handler used when downloading an attachment from the gallery screen. final UnitsetAttachmentDeleteOptionClickHandler(AttachmentGalleryActivity.AttachmentDeleteOptionHandler handler)Sets the handler used when deleting an attachment from the gallery screen. final UnitsetErrorEventHandler(MessageListView.ErrorEventHandler handler)Sets the handler used when handling the errors defined in MessageListController.ErrorEvent. final UnitsetDeletedMessageVisibility(DeletedMessageVisibility deletedMessageVisibility)Sets the value used to filter deleted messages. final UnitsetModeratedMessageHandler(MessageListView.ModeratedMessageOptionHandler handler)Sets the handler used when the user interacts with ModeratedMessageDialogFragment. final UnitsetOnScrollToBottomHandler(MessageListView.OnScrollToBottomHandler handler)Sets the handler used when the user interacts with ScrollButtonView. final UnitsetOnUnreadLabelClickListener(MessageListView.OnUnreadLabelClickListener listener)Sets the handler used when the user interacts with the unread label. final UnitsetOnUnreadLabelReachedListener(MessageListView.OnUnreadLabelReachedListener listener)Sets the handler used when the unread label is reached. final UnitshowModeratedMessageDialog(Message message)Used to display the moderated message dialog when you long click on a message that has failed the moderation check. final UnithideUnreadLabelButton()Hide the unread label button. final UnitshowUnreadLabelButton(Integer unreadCount)Show the unread label button. -
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, 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, 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, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHandwritingBoundsOffsets, setHandwritingDelegatorCallback, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, 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, getAccessibilityClassName, 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, 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 androidx.constraintlayout.widget.ConstraintLayout
fillMetrics, forceLayout, generateLayoutParams, getDesignInformation, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOptimizationLevel, getSceneString, getViewById, getViewWidget, loadLayoutDescription, onViewAdded, onViewRemoved, requestLayout, setConstraintSet, setDesignInformation, setId, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOnConstraintsChanged, setOptimizationLevel, setState, shouldDelayChildPressedState -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MessageListView
MessageListView(Context context)
-
MessageListView
MessageListView(Context context, AttributeSet attrs)
-
MessageListView
MessageListView(Context context, AttributeSet attrs, Integer defStyleAttr)
-
-
Method Detail
-
showMessageOptionsDialog
final Unit showMessageOptionsDialog(FragmentManager fragmentManager, Message message, List<MessageOptionItem> messageOptionItems, Function2<Message, String, Unit> reactionClickListener, Function1<MessageAction, Unit> optionClickListener)
Show message options dialog for the given set of message options.
- Parameters:
fragmentManager- The FragmentManager this dialog fragment will be added to.message- The selected message.messageOptionItems- The list of message options to display.reactionClickListener- The callback to be invoked on reaction item click.optionClickListener- The callback to be invoked on option item click.
-
init
@Deprecated(message = "Use updateChannel instead", replaceWith = @ReplaceWith(imports = {}, expression = "updateChannel(channel)"), level = DeprecationLevel.WARNING) final Unit init(Channel channel)
Initializes the message list view with the Channel object.
- Parameters:
channel- The channel object.
-
setOwnCapabilities
final Unit setOwnCapabilities(Set<String> ownCapabilities)
Setter method for own capabilities which dictate which parts of the UI are enabled or disabled for the current user in the given channel.
-
getRecyclerView
final RecyclerView getRecyclerView()
Returns the inner RecyclerView that is used to display a list of message list items.
- Returns:
The inner RecyclerView with messages.
-
setLoadingMore
final Unit setLoadingMore(Boolean loadingMore)
Used to indicate that the message list is loading more messages.
- Parameters:
loadingMore- True if the list the next page of messages is loading.
-
scrollToMessage
final Unit scrollToMessage(Message message)
Scrolls the list to the target message and highlights it. Only works if the target message is already present in the list.
- Parameters:
message- The message to scroll to and highlight.
-
updateChannel
final Unit updateChannel(Channel channel)
Updates the channel object used by the message list and initializes adapter if it's not initialized yet.
- Parameters:
channel- The channel object.
-
scrollToBottom
final Unit scrollToBottom()
Scrolls the message list to the bottom.sl
-
setCustomLinearLayoutManager
final Unit setCustomLinearLayoutManager(LinearLayoutManager layoutManager)
Set a custom layout manager for MessageListView. This can be used to change orientation of messages.
-
setCustomItemAnimator
final Unit setCustomItemAnimator(RecyclerView.ItemAnimator itemAnimator)
Set a custom item animator for MessageListView. That will handle animations involving changes to the items in this MessageListView.
- Parameters:
itemAnimator- The ItemAnimator being set.
-
setLoadingView
@JvmOverloads() final Unit setLoadingView(View view, FrameLayout.LayoutParams layoutParams)
Sets the view to be displayed when the message list is loading.
- Parameters:
view- Will be added to the view hierarchy of MessageListView and managed by it.layoutParams- Defines how the view will be situated inside its container ViewGroup.
-
setLoadingView
@JvmOverloads() final Unit setLoadingView(View view)
Sets the view to be displayed when the message list is loading.
- Parameters:
view- Will be added to the view hierarchy of MessageListView and managed by it.
-
showLoadingView
final Unit showLoadingView()
Shows the loading view.
-
hideLoadingView
final Unit hideLoadingView()
Hides the loading view.
-
shouldRequestMessagesAtBottom
final Unit shouldRequestMessagesAtBottom(Boolean shouldRequest)
Enables fetch for messages at the bottom.
-
setEmptyStateView
@JvmOverloads() final Unit setEmptyStateView(View view, FrameLayout.LayoutParams layoutParams)
Sets the view to be displayed when the message list is empty.
- Parameters:
view- Will be added to the view hierarchy of MessageListView and managed by it.layoutParams- Defines how the view will be situated inside its container ViewGroup.
-
setEmptyStateView
@JvmOverloads() final Unit setEmptyStateView(View view)
Sets the view to be displayed when the message list is empty.
- Parameters:
view- Will be added to the view hierarchy of MessageListView and managed by it.
-
showEmptyStateView
final Unit showEmptyStateView()
Shows the empty view.
-
hideEmptyStateView
final Unit hideEmptyStateView()
Hides the empty view.
-
showError
final Unit showError(MessageListController.ErrorEvent errorEvent)
Shows a error for one of the reasons defined in MessageListController.ErrorEvent.
- Parameters:
errorEvent- The error event containing information about the error.
-
setNewMessagesBehaviour
final Unit setNewMessagesBehaviour(MessageListView.NewMessagesBehaviour newMessagesBehaviour)
Used to control whether the message list is scrolled to the bottom when new messages arrive or the unread count badge is incremented instead.
- Parameters:
newMessagesBehaviour- The behavior to be used when new messages are added to the list.
-
setScrollToBottomButtonEnabled
final Unit setScrollToBottomButtonEnabled(Boolean scrollToBottomButtonEnabled)
Enables or disables the scroll to bottom button.
- Parameters:
scrollToBottomButtonEnabled- True if scroll to bottom button should be displayed.
-
setEditMessageEnabled
final Unit setEditMessageEnabled(Boolean enabled)
Enables or disables the message editing feature.
- Parameters:
enabled- True if editing a message is enabled, false otherwise.
-
setDeleteMessageEnabled
final Unit setDeleteMessageEnabled(Boolean enabled)
Enables or disables the message deleting feature.
- Parameters:
enabled- True if deleting a message is enabled, false otherwise.
-
setDeleteMessageConfirmationEnabled
final Unit setDeleteMessageConfirmationEnabled(Boolean enabled)
Enables or disables the message delete confirmation showing.
- Parameters:
enabled- True if deleting a message is enabled, false otherwise.
-
setCopyMessageEnabled
final Unit setCopyMessageEnabled(Boolean enabled)
Enables or disables the message copy feature.
- Parameters:
enabled- True if copying a message is enabled, false otherwise.
-
setMessageFlagEnabled
final Unit setMessageFlagEnabled(Boolean enabled)
Enables or disables the message flagging feature.
- Parameters:
enabled- True if user muting is enabled, false otherwise.
-
setReactionsEnabled
final Unit setReactionsEnabled(Boolean enabled)
Enables or disables the message reactions feature.
- Parameters:
enabled- True if user muting is enabled, false otherwise.
-
setThreadsEnabled
final Unit setThreadsEnabled(Boolean enabled)
Enables or disables the message threading feature.
- Parameters:
enabled- True if user muting is enabled, false otherwise.
-
setRepliesEnabled
final Unit setRepliesEnabled(Boolean enabled)
Enables or disables the message threading feature.
- Parameters:
enabled- True if user muting is enabled, false otherwise.
-
setMessageViewHolderFactory
final Unit setMessageViewHolderFactory(MessageListItemViewHolderFactory messageListItemViewHolderFactory)
Allows clients to set a custom implementation of MessageListItemViewHolderFactory. Use this method if you want completely custom views for the message list items.
- Parameters:
messageListItemViewHolderFactory- The custom factory to be used when generating item ViewHolders.
-
setMessageBackgroundFactory
final Unit setMessageBackgroundFactory(MessageBackgroundFactory messageBackgroundFactory)
Allows clients to set a custom implementation of MessageBackgroundFactory. Use this method if you want to change the background of messages
- Parameters:
messageBackgroundFactory- The custom factory that provides drawables to be used in the messages background
-
setMessageOptionItemsFactory
final Unit setMessageOptionItemsFactory(MessageOptionItemsFactory messageOptionItemsFactory)
Allows clients to set a custom implementation of MessageOptionItemsFactory. Use this method if you want to change the message options on the message options overlay.
- Parameters:
messageOptionItemsFactory- The custom factory that provides option items for the message options overlay.
-
setMessageDateFormatter
final Unit setMessageDateFormatter(DateFormatter messageDateFormatter)
Allows clients to set a custom implementation of DateFormatter to format the message date.
- Parameters:
messageDateFormatter- The formatter that is used to format the message date.
-
setShowAvatarPredicate
final Unit setShowAvatarPredicate(MessageListView.ShowAvatarPredicate showAvatarPredicate)
Used to control the visibility of the user avatar for a particular message list item.
- Parameters:
showAvatarPredicate- The predicate that checks if the avatar should be shown.
-
displayNewMessages
final Unit displayNewMessages(MessageListItemWrapper messageListItemWrapper)
Shows the message list items.
- Parameters:
messageListItemWrapper- The object containing all the information required to render the message list.
-
setMessageListItemPredicate
final Unit setMessageListItemPredicate(MessageListView.MessageListItemPredicate messageListItemPredicate)
Allows applying a filter condition to the message list before it is rendered.
- Parameters:
messageListItemPredicate- The predicate used to filter the list of MessageListItem.
-
setMessageItemTransformer
final Unit setMessageItemTransformer(MessageListView.MessageListItemTransformer messageListItemTransformer)
Allows to transform the message list data before it is rendered on the screen.
- Parameters:
messageListItemTransformer- The transformer used to modify the message list item.
-
setAttachmentFactoryManager
final Unit setAttachmentFactoryManager(AttachmentFactoryManager attachmentFactoryManager)
Allows clients to set an instance of AttachmentFactoryManager that holds a list of custom attachment factories. Use this method to create a custom content view for the message attachments.
- Parameters:
attachmentFactoryManager- Hold the list of factories for custom attachments.
-
handleFlagMessageResult
final Unit handleFlagMessageResult(Result<Flag> result)
-
requireStyle
final MessageListViewStyle requireStyle()
Returns an instance of MessageListViewStyle associated with this instance of MessageListView. Be sure invoke this method after this view laid out on layout and already initialized, otherwise you'll get an exception.
- Returns:
The instance of MessageListViewStyle associated with this MessageListView.
-
isAdapterInitialized
final Boolean isAdapterInitialized()
- Returns:
if the adapter has been initialized or not.
-
setMessageClickListener
@Deprecated(message = "Use setOnMessageClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnMessageClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setMessageClickListener(MessageListView.MessageClickListener messageClickListener)
Sets the message click listener to be used by MessageListView.
- Parameters:
messageClickListener- The listener to use.
-
setOnMessageClickListener
final Unit setOnMessageClickListener(MessageListView.OnMessageClickListener listener)
Sets the message click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setMessageLongClickListener
@Deprecated(message = "Use setOnMessageLongClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnMessageLongClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setMessageLongClickListener(MessageListView.MessageLongClickListener messageLongClickListener)
Sets the message long click listener to be used by MessageListView.
- Parameters:
messageLongClickListener- The listener to use.
-
setOnMessageLongClickListener
final Unit setOnMessageLongClickListener(MessageListView.OnMessageLongClickListener listener)
Sets the message long click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setModeratedMessageLongClickListener
@Deprecated(message = "Use setOnModeratedMessageLongClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnModeratedMessageLongClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setModeratedMessageLongClickListener(MessageListView.ModeratedMessageLongClickListener moderatedMessageLongClickListener)
Sets the moderated message long click listener to be used by MessageListView.
- Parameters:
moderatedMessageLongClickListener- The listener to use.
-
setOnModeratedMessageLongClickListener
final Unit setOnModeratedMessageLongClickListener(MessageListView.OnModeratedMessageLongClickListener listener)
Sets the moderated message long click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setMessageRetryListener
@Deprecated(message = "Use setOnMessageRetryListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnMessageRetryListener(listener)"), level = DeprecationLevel.WARNING) final Unit setMessageRetryListener(MessageListView.MessageRetryListener messageRetryListener)
Sets the message retry listener to be used by MessageListView.
- Parameters:
messageRetryListener- The listener to use.
-
setOnMessageRetryListener
final Unit setOnMessageRetryListener(MessageListView.OnMessageRetryListener listener)
Sets the message retry listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setThreadClickListener
@Deprecated(message = "Use setOnThreadClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnThreadClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setThreadClickListener(MessageListView.ThreadClickListener threadClickListener)
Sets the thread click listener to be used by MessageListView.
- Parameters:
threadClickListener- The listener to use.
-
setOnThreadClickListener
final Unit setOnThreadClickListener(MessageListView.OnThreadClickListener listener)
Sets the thread click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setAttachmentClickListener
@Deprecated(message = "Use setOnAttachmentClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnAttachmentClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setAttachmentClickListener(MessageListView.AttachmentClickListener attachmentClickListener)
Sets the attachment click listener to be used by MessageListView.
- Parameters:
attachmentClickListener- The listener to use.
-
setOnAttachmentClickListener
final Unit setOnAttachmentClickListener(MessageListView.OnAttachmentClickListener listener)
Sets the attachment click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setAttachmentDownloadClickListener
@Deprecated(message = "Use setOnAttachmentDownloadClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnAttachmentDownloadClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setAttachmentDownloadClickListener(MessageListView.AttachmentDownloadClickListener attachmentDownloadClickListener)
Sets the attachment download click listener to be used by MessageListView.
- Parameters:
attachmentDownloadClickListener- The listener to use.
-
setOnAttachmentDownloadClickListener
final Unit setOnAttachmentDownloadClickListener(MessageListView.OnAttachmentDownloadClickListener listener)
Sets the attachment download click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setReactionViewClickListener
@Deprecated(message = "Use setOnReactionViewClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnReactionViewClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setReactionViewClickListener(MessageListView.ReactionViewClickListener reactionViewClickListener)
Sets the reaction view click listener to be used by MessageListView.
- Parameters:
reactionViewClickListener- The listener to use.
-
setOnReactionViewClickListener
final Unit setOnReactionViewClickListener(MessageListView.OnReactionViewClickListener listener)
Sets the reaction view click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setUserClickListener
@Deprecated(message = "Use setOnUserClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnUserClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setUserClickListener(MessageListView.UserClickListener userClickListener)
Sets the user click listener to be used by MessageListView.
- Parameters:
userClickListener- The listener to use.
-
setOnUserClickListener
final Unit setOnUserClickListener(MessageListView.OnUserClickListener listener)
Sets the user click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setLinkClickListener
final Unit setLinkClickListener(MessageListView.LinkClickListener linkClickListener)
Sets the link click listener to be used by MessageListView.
- Parameters:
linkClickListener- The listener to use.
-
setOnLinkClickListener
final Unit setOnLinkClickListener(MessageListView.OnLinkClickListener listener)
Sets the link click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setEnterThreadListener
@Deprecated(message = "Use setOnEnterThreadListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnEnterThreadListener(listener)"), level = DeprecationLevel.WARNING) final Unit setEnterThreadListener(MessageListView.EnterThreadListener enterThreadListener)
Sets the thread click listener to be used by MessageListView.
- Parameters:
enterThreadListener- The listener to use.
-
setOnEnterThreadListener
final Unit setOnEnterThreadListener(MessageListView.OnEnterThreadListener listener)
Sets the thread click listener to be used by MessageListView.
- Parameters:
listener- The listener to use.
-
setUserReactionClickListener
@Deprecated(message = "Use setOnUserReactionClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnUserReactionClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setUserReactionClickListener(MessageListView.UserReactionClickListener userReactionClickListener)
Sets the click listener to be used when a reaction left by a user is clicked on the message options overlay.
- Parameters:
userReactionClickListener- The listener to use.
-
setOnUserReactionClickListener
final Unit setOnUserReactionClickListener(MessageListView.OnUserReactionClickListener listener)
Sets the click listener to be used when a reaction left by a user is clicked on the message options overlay.
- Parameters:
listener- The listener to use.
-
setReplyMessageClickListener
@Deprecated(message = "Use setOnReplyMessageClickListener instead", replaceWith = @ReplaceWith(imports = {}, expression = "setOnReplyMessageClickListener(listener)"), level = DeprecationLevel.WARNING) final Unit setReplyMessageClickListener(MessageListView.ReplyMessageClickListener replyMessageClickListener)
Sets the click listener to be used when a message that is a reply is clicked.
- Parameters:
replyMessageClickListener- The listener to use.
-
setOnReplyMessageClickListener
final Unit setOnReplyMessageClickListener(MessageListView.OnReplyMessageClickListener listener)
Sets the click listener to be used when a message that is a reply is clicked.
- Parameters:
listener- The listener to use.
-
setEndRegionReachedHandler
final Unit setEndRegionReachedHandler(MessageListView.EndRegionReachedHandler endRegionReachedHandler)
Sets the handler used when the end region is reached.
- Parameters:
endRegionReachedHandler- The handler to use.
-
setBottomEndRegionReachedHandler
final Unit setBottomEndRegionReachedHandler(MessageListView.BottomEndRegionReachedHandler bottomEndRegionReachedHandler)
Sets the handler used when the bottom end region is reached. This runs whe list of messages in this view becomes non linear and it will be called until it becomes linear again.
- Parameters:
bottomEndRegionReachedHandler- The handler to use.
-
setLastMessageReadHandler
final Unit setLastMessageReadHandler(MessageListView.LastMessageReadHandler lastMessageReadHandler)
Sets the handler used when the last message is read.
- Parameters:
lastMessageReadHandler- The handler to use.
-
setMessageEditHandler
final Unit setMessageEditHandler(MessageListView.MessageEditHandler messageEditHandler)
Sets the handler used to let the message input know when we are editing a message.
- Parameters:
messageEditHandler- The handler to use.
-
setMessageDeleteHandler
final Unit setMessageDeleteHandler(MessageListView.MessageDeleteHandler messageDeleteHandler)
Sets the handler used when the the message is going to be deleted.
- Parameters:
messageDeleteHandler- The handler to use.
-
setThreadStartHandler
final Unit setThreadStartHandler(MessageListView.ThreadStartHandler threadStartHandler)
Sets the handler used when a new thread for the message is started.
- Parameters:
threadStartHandler- The handler to use.
-
setMessageFlagHandler
final Unit setMessageFlagHandler(MessageListView.MessageFlagHandler messageFlagHandler)
Sets the handler used when the message is going to be flagged.
- Parameters:
messageFlagHandler- The handler to use.
-
setFlagMessageResultHandler
final Unit setFlagMessageResultHandler(MessageListView.FlagMessageResultHandler flagMessageResultHandler)
Sets the handler used to handle flag message result.
- Parameters:
flagMessageResultHandler- The handler to use.
-
setMessagePinHandler
final Unit setMessagePinHandler(MessageListView.MessagePinHandler messagePinHandler)
Sets the handler used to handle when the message is going to be pinned.
- Parameters:
messagePinHandler- The handler to use.
-
setMessageMarkAsUnreadHandler
final Unit setMessageMarkAsUnreadHandler(MessageListView.MessageMarkAsUnreadHandler messageMarkAsUnreadHandler)
Sets the handler used to handle when the message is going to be marked as read.
-
setMessageUnpinHandler
final Unit setMessageUnpinHandler(MessageListView.MessageUnpinHandler messageUnpinHandler)
Sets the handler used to handle when the message is going to be unpinned.
- Parameters:
messageUnpinHandler- The handler to use.
-
setGiphySendHandler
final Unit setGiphySendHandler(MessageListView.GiphySendHandler giphySendHandler)
Sets the handler used when giphy action is going to be performed.
- Parameters:
giphySendHandler- The handler to use.
-
setMessageRetryHandler
final Unit setMessageRetryHandler(MessageListView.MessageRetryHandler messageRetryHandler)
Sets the handler used when the failed message is going to be retried.
- Parameters:
messageRetryHandler- The handler to use.
-
setMessageReactionHandler
final Unit setMessageReactionHandler(MessageListView.MessageReactionHandler messageReactionHandler)
Sets the handler used when a reaction for the message is going to be send.
- Parameters:
messageReactionHandler- The handler to use.
-
setCustomActionHandler
final Unit setCustomActionHandler(MessageListView.CustomActionHandler customActionHandler)
Set the handler used when the custom action is going to be executed.
- Parameters:
customActionHandler- The handler to use.
-
setMessageReplyHandler
final Unit setMessageReplyHandler(MessageListView.MessageReplyHandler messageReplyHandler)
Sets the handler used when the message is going to be replied in the channel.
- Parameters:
messageReplyHandler- The handler to use.
-
setAttachmentDownloadHandler
final Unit setAttachmentDownloadHandler(MessageListView.AttachmentDownloadHandler attachmentDownloadHandler)
Sets the handler used when the attachment is going to be downloaded.
- Parameters:
attachmentDownloadHandler- The handler to use.
-
setConfirmDeleteMessageHandler
final Unit setConfirmDeleteMessageHandler(MessageListView.ConfirmDeleteMessageHandler confirmDeleteMessageHandler)
Sets the handler used to confirm that the message is going to be deleted.
- Parameters:
confirmDeleteMessageHandler- The handler to use.
-
setConfirmFlagMessageHandler
final Unit setConfirmFlagMessageHandler(MessageListView.ConfirmFlagMessageHandler confirmFlagMessageHandler)
Sets the handler used to confirm that the message is going to be flagged.
- Parameters:
confirmFlagMessageHandler- The handler to use.
-
setAttachmentReplyOptionClickHandler
final Unit setAttachmentReplyOptionClickHandler(AttachmentGalleryActivity.AttachmentReplyOptionHandler handler)
Sets the handler used when replying to an attachment from the gallery screen.
- Parameters:
handler- The handler to use.
-
setAttachmentShowInChatOptionClickHandler
final Unit setAttachmentShowInChatOptionClickHandler(AttachmentGalleryActivity.AttachmentShowInChatOptionHandler handler)
Sets the handler used when navigating to a message from the gallery screen.
- Parameters:
handler- The handler to use.
-
setDownloadOptionHandler
final Unit setDownloadOptionHandler(AttachmentGalleryActivity.AttachmentDownloadOptionHandler handler)
Sets the handler used when downloading an attachment from the gallery screen.
- Parameters:
handler- The handler to use.
-
setAttachmentDeleteOptionClickHandler
final Unit setAttachmentDeleteOptionClickHandler(AttachmentGalleryActivity.AttachmentDeleteOptionHandler handler)
Sets the handler used when deleting an attachment from the gallery screen.
- Parameters:
handler- The handler to use.
-
setErrorEventHandler
final Unit setErrorEventHandler(MessageListView.ErrorEventHandler handler)
Sets the handler used when handling the errors defined in MessageListController.ErrorEvent.
- Parameters:
handler- The handler to use.
-
setDeletedMessageVisibility
final Unit setDeletedMessageVisibility(DeletedMessageVisibility deletedMessageVisibility)
Sets the value used to filter deleted messages.
- Parameters:
deletedMessageVisibility- Changes the visibility of deleted messages.
-
setModeratedMessageHandler
final Unit setModeratedMessageHandler(MessageListView.ModeratedMessageOptionHandler handler)
Sets the handler used when the user interacts with ModeratedMessageDialogFragment.
- Parameters:
handler- The handler to use.
-
setOnScrollToBottomHandler
final Unit setOnScrollToBottomHandler(MessageListView.OnScrollToBottomHandler handler)
Sets the handler used when the user interacts with ScrollButtonView.
- Parameters:
handler- The handler to use.
-
setOnUnreadLabelClickListener
final Unit setOnUnreadLabelClickListener(MessageListView.OnUnreadLabelClickListener listener)
Sets the handler used when the user interacts with the unread label.
- Parameters:
listener- The listener to use.
-
setOnUnreadLabelReachedListener
final Unit setOnUnreadLabelReachedListener(MessageListView.OnUnreadLabelReachedListener listener)
Sets the handler used when the unread label is reached.
- Parameters:
listener- The listener to use.
-
showModeratedMessageDialog
final Unit showModeratedMessageDialog(Message message)
Used to display the moderated message dialog when you long click on a message that has failed the moderation check.
Used by the default moderated message long click listener as well as the general default message long click listener which internally calls the moderated message long click listener if the message has failed the moderation check.
- Parameters:
message- The message that has failed moderation, used to show the moderation dialog.
-
hideUnreadLabelButton
final Unit hideUnreadLabelButton()
Hide the unread label button.
-
showUnreadLabelButton
final Unit showUnreadLabelButton(Integer unreadCount)
Show the unread label button.
- Parameters:
unreadCount- The number of unread messages.
-
-
-
-