Package com.pspdfkit.listeners
Class OnVisibilityChangedListenerManager
-
- All Implemented Interfaces:
-
com.pspdfkit.listeners.OnVisibilityChangedListener
public class OnVisibilityChangedListenerManager implements OnVisibilityChangedListener
Collection of multiple OnVisibilityChangedListener objects. Calling onShow and onHide will dispatch on all previously added listeners.
-
-
Constructor Summary
Constructors Constructor Description OnVisibilityChangedListenerManager()
-
Method Summary
Modifier and Type Method Description void
addOnVisibilityChangedListener(@NonNull() OnVisibilityChangedListener listener)
Adds a listener to the collection. void
removeOnVisibilityChangedListener(@NonNull() OnVisibilityChangedListener listener)
Removes a previously added listener from the collection. void
clear()
Removes all previously added OnVisibilityChangedListener instances. void
onShow(@NonNull() View view)
Called whenever a PSPDFKit view has become visible. void
onHide(@NonNull() View view)
Called whenever a PSPDFKit view has been hidden. -
-
Method Detail
-
addOnVisibilityChangedListener
void addOnVisibilityChangedListener(@NonNull() OnVisibilityChangedListener listener)
Adds a listener to the collection.
- Parameters:
listener
- On visibility changed listener to be added.
-
removeOnVisibilityChangedListener
void removeOnVisibilityChangedListener(@NonNull() OnVisibilityChangedListener listener)
Removes a previously added listener from the collection. Once removed the listener will no longer receive visibility change events.
- Parameters:
listener
- On visibility changed listener to be added.
-
clear
void clear()
Removes all previously added OnVisibilityChangedListener instances.
-
onShow
void onShow(@NonNull() View view)
Called whenever a PSPDFKit view has become visible.
- Parameters:
view
- View that became visible.
-
-
-
-