Xamarin.Forms. Android. Badge for an item in the action bar?

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

Is it possible and how to add a badge for an action bar item using Xamarin.Forms?

I used PageRenderer for iOS, here is the code:

public class PageWithBadgeToolbarItemsRenderer : PageRenderer

        public override void ViewWillAppear(bool animated)

            var page = this.Element as Page;
            if (page == null)

            var items = page.ToolbarItems.Select(item => 
                    var badgeItem = item as ToolbarItemWithBadge;
                    return badgeItem == null 
                        ? item.ToUIBarButtonItem() 
                            : new UIBarButtonItemWithBadge(badgeItem, this.NativeView, false);

                .SetRightBarButtonItems(items.ToArray(), true);

But I don’t see how to do any customisation of items for android.

The screen example attached.

Thank you for your help.


Sign In or Register to comment.