public interface

ToolbarCoordinatorLayoutController

com.pspdfkit.ui.toolbar.ToolbarCoordinatorLayoutController
Known Indirect Subclasses

Class Overview

An interface to be implemented by ToolbarCoordinatorLayout through which other components are enabled to control the toolbar movements, animations, etc.

Summary

Public Methods
abstract void attachContextualToolbar()
Attach current contextual toolbar (if any) to the layout so it's unable to move.
abstract void detachContextualToolbar()
Detach current contextual toolbar (if any) from the layout so it's able to move.
abstract void displayContextualToolbar(ContextualToolbar toolbar, boolean animate)
Sets the contextual toolbar to be displayed in the coordinator.
abstract void onContextualToolbarChanged(ContextualToolbar toolbar)
Called when the ContextualToolbar menu items have changed internally.
abstract void onContextualToolbarPositionChanged(ContextualToolbar toolbar, ToolbarCoordinatorLayout.LayoutParams.Position oldPosition, ToolbarCoordinatorLayout.LayoutParams.Position newPosition)
Called when the ContextualToolbar position has changed.
abstract void removeContextualToolbar(boolean animate)
Removes current contextual toolbar from the layout (if there is any).

Public Methods

public abstract void attachContextualToolbar ()

Attach current contextual toolbar (if any) to the layout so it's unable to move.

public abstract void detachContextualToolbar ()

Detach current contextual toolbar (if any) from the layout so it's able to move.

public abstract void displayContextualToolbar (ContextualToolbar toolbar, boolean animate)

Sets the contextual toolbar to be displayed in the coordinator. Only one contextual toolbar can be set, so if there is a previously added contextual toolbar, it will be removed.

Parameters
toolbar Toolbar to be set to the coordinator and displayed.
animate true to animate toolbar removal, false otherwise.

public abstract void onContextualToolbarChanged (ContextualToolbar toolbar)

Called when the ContextualToolbar menu items have changed internally.

This will trigger a call to onPrepareContextualToolbar(ContextualToolbar), giving users the chance to modify the toolbar - e.g. to apply a custom grouping rule or hide toolbar items.

Parameters
toolbar Toolbar that has changed.

public abstract void onContextualToolbarPositionChanged (ContextualToolbar toolbar, ToolbarCoordinatorLayout.LayoutParams.Position oldPosition, ToolbarCoordinatorLayout.LayoutParams.Position newPosition)

Called when the ContextualToolbar position has changed.

Parameters
toolbar Toolbar which position has changed.
oldPosition Old position, or null if toolbar has been just shown.
newPosition New posiiton of the toolbar.

public abstract void removeContextualToolbar (boolean animate)

Removes current contextual toolbar from the layout (if there is any).

Parameters
animate true to animate toolbar removal, false otherwise.