addTheme

public static void addTheme(String themeType, int lightStyleResId, int darkStyleResId)

Registers a theme with light and dark style variants.

Calling this method multiple times for the same themeType stacks the styles: each additional call appends a new layer, and later layers override earlier ones for the same attribute.

// Register a custom theme with light/dark variants
ChatUIThemeManager.addTheme(
    "CUSTOM_THEME",
    R.style.MyCustomLightTheme,
    R.style.MyCustomDarkTheme
);

// Stack additional overrides on top of an existing theme
ChatUIThemeManager.addTheme(
    ChatUIThemeManager.LIVELY_THEME,
    R.style.MyOverrideLight,
    R.style.MyOverrideDark
);

Parameters

themeType

theme identifier (use UPPER_SNAKE_CASE, e.g. "CUSTOM_BLUE_THEME")

lightStyleResId

style resource ID for light mode (must be non-zero)

darkStyleResId

style resource ID for dark mode (must be non-zero)