Skip to main content

Theme Mode

Global IM UIKit supports three global themes: light, dark, and system-following. You can set the theme mode via the ThemeMode property in FeatureConfig:

public enum ThemeMode {
/**
* Follow system
*/
THEME_FOLLOW_SYSTEM,

/**
* Light mode
*/
THEME_LIGHT_MODE,

/**
* Dark mode
*/
THEME_DARK_MODE,
}

The default theme mode for Global IM UIKit is THEME_FOLLOW_SYSTEM.

Light Theme

Set the global theme to light mode.

ConfigCenter.getFeatureConfig().setThemeMode(FeatureConfig.ThemeMode.THEME_LIGHT_MODE);

(width=220) (width=220)

Dark Theme

Set the global theme to dark mode.

ConfigCenter.getFeatureConfig().setThemeMode(FeatureConfig.ThemeMode.THEME_DARK_MODE);

(width=220) (width=220)