MainToolbar

fun MainToolbar(modifier: Modifier = Modifier, documentState: DocumentState, colorScheme: UiColorScheme = getUiColors(), windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, customTitle: @Composable (String) -> Unit? = null, navigationIcon: @Composable (tintColor: Color) -> Unit = {}, actions: @Composable RowScope.(tintColor: Color) -> Unit = {}, overFlowActions: @Composable ColumnScope.(tintColor: Color) -> Unit? = null, onHeightChanged: (Int) -> Unit? = null)

Composable that displays the Main tool bar for DocumentView.

Parameters

modifier

The Modifier to be applied to the layout.

documentState

The DocumentState describing the document to be shown.

colorScheme

Provides customised Material themes to Composables can be used as val colors = getPdfColors() colorScheme = colors.copy(mainToolbar = colors.mainToolbar.copy(backgroundColor = Color.Red)

windowInsets

The window insets to be applied to the layout.

customTitle

The composable scope for customisable title view.

navigationIcon

The composable scope for customisable navigation icon.

actions

The actions displayed at the end of the existing menu items.

overFlowActions

The actions displayed in the overflow menu.

onHeightChanged

The callback to be called when the height of the toolbar changes.

Make sure to disable the default toolbar via PdfActivityConfiguration.Builder.disableDefaultToolbar before adding this.