com.pspdfkit.ui.toolbar.ToolbarCoordinatorLayoutController |
![]() |
An interface to be implemented by ToolbarCoordinatorLayout
through which other components
are enabled to control the toolbar movements, animations, etc.
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).
|
Attach current contextual toolbar (if any) to the layout so it's unable to move.
Detach current contextual toolbar (if any) from the layout so it's able to move.
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.
toolbar | Toolbar to be set to the coordinator and displayed. |
---|---|
animate | true to animate toolbar removal, false otherwise.
|
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.
toolbar | Toolbar that has changed. |
---|
Called when the ContextualToolbar
position has changed.
toolbar | Toolbar which position has changed. |
---|---|
oldPosition | Old position, or null if toolbar has been just shown. |
newPosition | New posiiton of the toolbar. |
Removes current contextual toolbar from the layout (if there is any).
animate | true to animate toolbar removal, false otherwise.
|
---|