How to access ActionBar MenuItem in android?

DenisZakharov.2605DenisZakharov.2605 USMember
edited February 2016 in Xamarin.Forms


I have a page with toolbar items in it.

    <ToolbarItem Text="123”/> <!--action_myitem-->

How to access ActionBar MenuItem that rendered for <ToolbarItem Text="123”/> in Android?
The native analog of needed functionality is

public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(, menu);

        // Get the notifications MenuItem and 
        // its LayerDrawable (layer-list)
        MenuItem item = menu.findItem(;
        LayerDrawable icon = (LayerDrawable) item.getIcon();

        return true;

Thank you.

Best Answer


  • rraallvvrraallvv Member ✭✭

    @DenisZakharov.2605 is there a way to be notified from the custom renderer each time OnPrepareOptionsMenu is called? What I have in mind is to add a badge to one of the menu items without having add a customized native menu layout in xml

Sign In or Register to comment.