• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Adding badges to Bottom navigation

Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am trying to add badges in bottom navigation but the problem but getOrCreateBadge is not getting referenced. I am unable to access this method.

My xml file :

I am adding menu item during run time.

Above is the theme

Things which I have already tried :
1. Adding menu items from xml itself : still no effect
2. Changing theme to material theme : still same issue
3. Created a separate project with bottom navigation activity : No issue in that project if I add badges. I have changed it's theme too to my app theme i.e. App compat still badges are working fine in that project.
4. Initially dependency was not added of android material and I was able to use bottom navigation bar. But as I faced problem while adding badges so I have added dependency externally and made sure to put latest version also but still at the end facing the same issue. Unable to add badges in bottom navigation.

I know it's something very basic but if somebody could point it out that it would be a great help already stuck with this issue from past two days. Thank in advance.
Posts: 591
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
where you call getOrCreateBadge?
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic