I am trying to add a badge to the BottomNavigationView Item without using any library, however somehow the BottomNavigationView is not showing the
You can use the BottomNavigationView provided by the Material Components Library.
Just add the BottomNavigationView to your layout:
Then use in your code:
int menuItemId = bottomNavigationView.getMenu().getItem(0).getItemId();
BadgeDrawable badge = bottomNavigationView.getOrCreateBadge(menuItemId);
badge.setNumber(2);
To change the badge gravity use the setBadgeGravity method.
badge.setBadgeGravity(BadgeDrawable.BOTTOM_END);