Package 

Interface Lifecycle


  • 
    public interface Lifecycle
    
                        

    An interface for listening to Activity/Fragment lifecycle events.

    • Method Summary

      Modifier and Type Method Description
      abstract void addListener(@NonNull() LifecycleListener listener) Adds the given listener to the set of listeners managed by this Lifecycle implementation.
      abstract void removeListener(@NonNull() LifecycleListener listener) Removes the given listener from the set of listeners managed by this Lifecycle implementation,returning {@code true} if the listener was removed successfully, and {@code false} otherwise.
      • Methods inherited from class java.lang.Object

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

      • removeListener

         abstract void removeListener(@NonNull() LifecycleListener listener)

        Removes the given listener from the set of listeners managed by this Lifecycle implementation,returning {@code true} if the listener was removed successfully, and {@code false} otherwise.

        This is an optimization only, there is no guarantee that every added listener willeventually be removed.