Interface ChatUIThemeManager.OnThemeListener

  • All Implemented Interfaces:

    
    public interface ChatUIThemeManager.OnThemeListener
    
                        

    Listener 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);
    
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void onThemeChanged(Context context, String oldTheme, String newTheme) Called when the active theme changes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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 call
        oldTheme - identifier of the previous theme (e.g.
        newTheme - identifier of the new theme