\ DO NOT MERGE THIS YET; I ACCIDENTALLY GOT AN OLDER VERSION OF THE BACKGROUND_CONTROLLER **
I changed the looks of the notification badge a bit so that it looks like the original Google+ notification badge (i.e. rounded corners and a stroke around them, see images for comparison). Furthermore I made the badge being rendered as inactive whenever the count is a non-positive number (if this is not desired, make sure to set newItem to false when calling the method with a count of zero, I didn't look where the method gets called).
Please see the comments in my commit; maybe the method for drawing a rounded rectangle should be added to the Canvas context prototype somewhere else.
Heya martin, this is great! Beyond awesome, very good job! Exactly what i am looking for!
Some comments.
Can you make another class named nptification badge renderer or anything you want that encapsulates all this? Becausete logic of nptification bade is getting large. Or create a static methpd class for canvas context helpers, your pick
Can you please rebase before you do a pull request, i have seen you touch some code that jphn and i were working on
\ DO NOT MERGE THIS YET; I ACCIDENTALLY GOT AN OLDER VERSION OF THE BACKGROUND_CONTROLLER **
I changed the looks of the notification badge a bit so that it looks like the original Google+ notification badge (i.e. rounded corners and a stroke around them, see images for comparison). Furthermore I made the badge being rendered as inactive whenever the count is a non-positive number (if this is not desired, make sure to set
newItem
to false when calling the method with acount
of zero, I didn't look where the method gets called).Please see the comments in my commit; maybe the method for drawing a rounded rectangle should be added to the Canvas context prototype somewhere else.