public interface MenuProvider

Interface for indicating that a component will be supplying MenuItems to the component owning the app bar.

Summary

Public methods

onPrepareMenu

default void onPrepareMenu(@NonNull Menu menu)

Called by the MenuHost right before the Menu is shown. This should be called when the menu has been dynamically updated.

Parameters
@NonNull Menu menu

the menu that is to be prepared

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-05-15 UTC.