I am using the new BottomAppBar in an app. But I can't make the badge to work. I tried using the same logic used on BottomNavigationView, but it is not working.(In another app I have a BottomNavigationView inside a BottomAppBar where the badge works, but couldn't use the same code in the BottomAppBar app(Navigation Icon).
MenuView.ItemView itemView = (MenuView.ItemView) bottomAppBar.getChildAt(posicao);
notificationBadge = LayoutInflater.from(this).inflate(R.layout.view_notification_badge, (ViewGroup) itemView, false);
TextView notific = notificationBadge.findViewById(R.id.badge);
notific.setText(notificacao);
itemView.addView(notificationBadge);
I tried the BadgeNavigationDrawable class. But couldn't find the right reference to the navigation icon in the BottomAppBar.
Thanks.