Replace specific regions of a component’s UI using the ViewHolderListener pattern without rebuilding the entire component.
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.
Bind data to your custom view. Called every time the item is bound (scroll, update). createdView is the view returned by createView, and the full conversation list and holder are provided for context.
Use slot-level setters (setLeadingView, setTitleView, setSubtitleView, setTrailingView) when you want to customize one region while keeping the default layout for everything else. Use setItemView when you need complete control over the entire row layout.
When you use setItemView, all other slot setters are ignored since the entire row is replaced.
Use setOverflowMenu(View) to inject a custom view into the component’s toolbar area. This is separate from the list item view slots — it customizes the toolbar, not individual rows.
Kotlin
Java
val menuButton = ImageButton(context).apply { setImageResource(R.drawable.ic_filter) setOnClickListener { /* show filter dialog */ }}conversations.setOverflowMenu(menuButton)
ImageButton menuButton = new ImageButton(context);menuButton.setImageResource(R.drawable.ic_filter);menuButton.setOnClickListener(v -> { /* show filter dialog */ });conversations.setOverflowMenu(menuButton);