Skip to main content
View Slots let you swap out specific parts of a component’s list item β€” the avatar area, title, subtitle, trailing section, or the entire row β€” while keeping the rest of the component’s behavior intact.

Available View Slots

When you use itemView, all other slot setters are ignored since the entire row is replaced.

How It Works

Each list-based component defines a ViewHolderListener abstract class with two callbacks:Pass the listener to the component via setLeadingView(), setTitleView(), setSubtitleView(), setTrailingView(), or setItemView().

Example: Custom Leading View

Replace the default avatar with a custom view showing the first letter of the conversation name.

Example: Custom Subtitle View

Show a custom last message format in the subtitle area.

Toolbar Overflow Menu

Inject a custom view into the component’s toolbar area. This is separate from list item view slots.

Components with View Slots

View slots are available on all list-based components: