OnToolbarItemClickListener

Handles taps on main-toolbar items, identified by their @IdRes id.

This is the Compose-toolbar replacement for intercepting clicks via the removed onOptionsItemSelected toolbar path: set it with com.pspdfkit.ui.PdfUi.setOnToolbarItemClickListener. The listener is consulted before the SDK's default handler, so returning true consumes the click exactly as returning true from onOptionsItemSelected does.

Functions

Link copied to clipboard
abstract fun onToolbarItemClick(@IdRes id: Int): Boolean

Called when a toolbar item is tapped.