setToolbarNavigationIcon

open fun setToolbarNavigationIcon(@Nullable icon: ToolbarIcon, @Nullable contentDescription: String)

Sets the main toolbar's navigation (up / back) icon and its accessibility label — the replacement for Toolbar.setNavigationIcon on the removed View toolbar. The icon is rendered at the toolbar's leading edge; taps arrive at the listener. Works the same on PdfActivity and on a PdfUiFragment embedded in a custom activity.

Parameters

icon

the icon to show (e.g. new ToolbarIcon.Resource(R.drawable.ic_back)), or null to remove the navigation icon.

contentDescription

accessibility label of the icon, or null for the default "Navigate up" (AppCompat's localized abc_action_bar_up_description).