getOrCreateBadge

open fun getOrCreateBadge(menuItemId: Int): BadgeDrawable

Creates an instance of BadgeDrawable associated with menuItemId if none exists. Initializes (if needed) and returns the associated instance of BadgeDrawable associated with menuItemId.

Return

an instance of BadgeDrawable associated with menuItemId.

Parameters

menuItemId

Id of the menu item.