Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sceyt/sceyt-chat-android-uikit/llms.txt
Use this file to discover all available pages before exploring further.
StyleCustomizer<S> is a fun interface that every UIKit component exposes through a styleCustomizer property on its companion object. It gives you a single interception point to override any part of a component’s default style before the view is first rendered — without subclassing or XML attribute juggling. Because it is a SAM interface, you can assign it directly as a Kotlin lambda.
Interface declaration
apply function receives the resolved Context and the fully-built default style instance. Return the style object — either unchanged, or replaced with a modified copy — and that result is what the component uses for the lifetime of the view.
Every style class in the UIKit is a Kotlin
data class, so you can safely call .copy(...) to override only the fields you care about while keeping everything else at its default value.How to register a customizer
Assign the customizer on the companion object of the target style class before the component is inflated. The earliest safe location isApplication.onCreate(), but any point before the hosting Activity or Fragment is created also works.
context: Context as its first argument, which you can use to resolve colors, drawables, or dimensions at the time the style is built.
When customizers are applied
Internally, each style class contains a nestedBuilder class that reads XML attributes and then calls the customizer as the very last step before returning the style object:
Context — giving you a complete picture to selectively override.
Examples
Example 1 — Change message bubble colors
Override the incoming and outgoing bubble background colors forMessagesListView:
Example 2 — Customize the channel list view
Override the background color ofChannelListView and disable popup actions:
Example 3 — Per-view customization for ChannelListView
If you use ChannelListView in more than one place and need different styles per instance, use setStyleCustomizerForViewId instead of the global styleCustomizer. Reference each view by its XML android:id:
setStyleCustomizerForViewId takes precedence over the global styleCustomizer for that specific view ID. If both are set, the per-view customizer wins.Components that expose styleCustomizer
Every UIKit component style follows the same pattern. A non-exhaustive list of companion objects that expose styleCustomizer:
| Style class | Component |
|---|---|
MessageItemStyle | Individual message bubbles inside MessagesListView |
ChannelListViewStyle | ChannelListView container |
ChannelItemStyle | Individual channel rows in the list |
ChannelInfoStyle | ChannelInfoActivity |
CustomCameraStyle | In-app camera screen |
CameraMediaPreviewStyle | Media preview after capture |