I wana add a notification badge on the cart image placed in action bar and manipulate it programmatically. Any Help?
Using https://github.com/nikartm/Image-Support that will take care of creating the badge with more options like max count limit, etc.
layout_menu_cart.xml
main_menu.xml
YourActivity.kt
val menuItem = menu.findItem(R.id.menu_cart) as MenuItem
val actionView = menuItem.actionView
actionView.findViewById(R.id.cart_menu_icon).badgeValue = count