invalidateMenu

open fun invalidateMenu()

Invalidates and refreshes the toolbar menu.

Call this method when you need to update the toolbar menu items dynamically, for example after changing menu configuration. This is particularly useful when embedding PdfFragment in a custom Activity where the standard invalidateOptionsMenu() doesn't refresh the PDF toolbar menu.

This triggers the full menu lifecycle: clearing the current menu, calling onCreateOptionsMenu, and onPrepareOptionsMenu.