Package ai.nexconn.chatui.config
Interface ChatUIThemeManager.OnThemeListener
-
- All Implemented Interfaces:
public interface ChatUIThemeManager.OnThemeListenerListener for theme-change events.
Registered via addThemeListener; invoked whenever the active theme changes.
OnThemeListener listener = new OnThemeListener() { @Override public void onThemeChanged(Context context, String oldTheme, String newTheme) { if (context instanceof Activity) { ((Activity) context).recreate(); } } }; ChatUIThemeManager.addThemeListener(listener); // Remove when no longer needed to avoid memory leaks ChatUIThemeManager.removeThemeListener(listener);
-
-
Method Summary
Modifier and Type Method Description abstract voidonThemeChanged(Context context, String oldTheme, String newTheme)Called when the active theme changes. -
-
Method Detail
-
onThemeChanged
abstract void onThemeChanged(Context context, String oldTheme, String newTheme)
Called when the active theme changes.
- Parameters:
context- the context passed to the theme-change calloldTheme- identifier of the previous theme (e.g.newTheme- identifier of the new theme
-
-
-
-