Android Question Badger on Toolbar Item

AHilton

Active Member
Licensed User
Can you use the XUI Badger with the AppCompat ACToolBarLight menu item?

Yes, there's a badging example in that AppCompat example but I'd like to use the new XUI Badger to do this, if possible.

I've tried …
B4X:
Dim Item As ACMenuItem = ACToolBarLight1.Menu.GetItem(0)     ' 0 = The menu item I'm wanting the badge set onto

Badger1.SetBadge(Item, 7, 0, 0)

… but am getting this error …

B4X:
java.lang.ClassCastException: android.support.v7.view.menu.MenuItemImpl cannot be cast to android.view.View
 
Top