-1

I have an online jokes app with a simple drawer layout.

When I launch the app, a PHP script gets new jokes(added from last visit) and counts them.

I want to add to the Menu item that displays the jokes the number of new jokes found, ex:3.( the menu item's text is "Meniu glume", I want to append it at the end with the number of new jokes)

How can I do this?should display like this

stcojo
  • 65
  • 7

1 Answers1

1

If you are using NavigationView class to show the Navigation drawer, then you could use the attribute app:actionLayout of the menu item to show custom view in the drawer items.

Refer this answer for more info. https://stackoverflow.com/a/33607630/4586742

Community
  • 1
  • 1
Bob
  • 13,447
  • 7
  • 35
  • 45