ToolbarCoordinatorLayout

This layout is responsible for handling toolbars. It is used in PdfActivity, but it can be added to any view group, for example to the root view of the custom activity.

Constructors

Link copied to clipboard
constructor(context: Context)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, @AttrRes defStyleAttr: Int)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, @AttrRes defStyleAttr: Int, @StyleRes defStyleRes: Int)

Types

Link copied to clipboard
Link copied to clipboard
Listener for the lifecycle of the ContextualToolbar as it goes through the .
Link copied to clipboard
Link copied to clipboard
Listener for ContextualToolbar position changes inside the .

Functions

Link copied to clipboard
Attach current contextual toolbar (if any) to the layout so it's unable to move.
Link copied to clipboard
Detach current contextual toolbar (if any) from the layout so it's able to move.
Link copied to clipboard
Sets the contextual toolbar to be displayed in the coordinator.
Link copied to clipboard
Gets the currently displayed contextual toolbar (if any).
Link copied to clipboard
open fun getToolbarInset(): Int
Calculates inset that should be applied on views under currently displayed toolbar to correctly inset their content below toolbar.
Link copied to clipboard
Indicates whether the contextual toolbar is being currently displayed.
Link copied to clipboard
Called when the ContextualToolbar menu items have changed internally.
Link copied to clipboard
Link copied to clipboard
open fun removeContextualToolbar(animate: Boolean)
Removes current contextual toolbar from the layout (if there is any).
Link copied to clipboard
open fun setDragTargetColor(@ColorInt dragTargetColor: Int)
Sets the color for possible position areas when the toolbar is being dragged.
Link copied to clipboard
open fun setMainToolbarEnabled(enabled: Boolean)
Sets whether the main toolbar is enabled or not.
Link copied to clipboard
Sets the listener for lifecycle changes of the ContextualToolbar as it goes through the ToolbarCoordinatorLayout - preparing, displaying, removing.
Link copied to clipboard
Sets the listener for ContextualToolbar movements within the layout.
Link copied to clipboard
Sets the listener for ContextualToolbar position within the layout.
Link copied to clipboard
open fun toggleMainToolbarVisibility(visible: Boolean, startDelayMs: Long, animationDurationMs: Long)
Toggles the visibility of the main toolbar.