0

I have implemented a nav drawer in my app and works well. There has been new requirement added to the project to display a notification count ON the nav drawer icon like below:

enter image description here

So my thought was to try and set a Relative Layout with an image view for hamburger icon and text view for the notification count.

I've looked around here (on SO) and online and I can't find anything that would help. Is there anyway around this problem or has anyone done this before? If I could do this without writing something custom that would be great as time is an issue.

I'm not looking for code, just pointing in the right direction.

DJ-DOO
  • 4,545
  • 15
  • 58
  • 98
  • what do you mean by *something custom* – Iamat8 Feb 03 '16 at 16:42
  • They're called badges, if that helps your search. I know several questions like this have already been asked here. – Mike M. Feb 03 '16 at 16:44
  • @Mohit by something custom, I mean a custom component – DJ-DOO Feb 03 '16 at 17:19
  • @MikeM. Thanks for your help. I've come across a bit on badges for the app icon, I'm just wondering if it's possible for the nav drawer icon... have they been implemented in app? – DJ-DOO Feb 03 '16 at 17:22
  • I dont think there is any default component which allow you to pop up some other component with some value add a textview view will hardly increase you app complexity – Iamat8 Feb 03 '16 at 17:23
  • [Here's](http://stackoverflow.com/questions/17696486/actionbar-notification-count-badge-like-google-has) the first one that came up in my search. The two or three top-voted answers after the accepted answer are what you're looking for. It'll be easier to implement what you want if you use a `Toolbar`, though, instead of the `ActionBar`. – Mike M. Feb 03 '16 at 17:31
  • @MikeM. Thanks for that, I found those too :) .However they don't do what I want, they just provide an additional menu item. Thank you for your help – DJ-DOO Feb 03 '16 at 17:35
  • That's what I mean by using a `Toolbar` instead. You can set the Navigation icon on a `Toolbar` to whatever you want. Or, skip the built-in `View`s altogether, and just make a completely custom `Toolbar`. – Mike M. Feb 03 '16 at 17:38

0 Answers0