2

I want to create notification like here:

enter image description here

Red circle = icon which is always visible. Blue circle = icon that is visible only when you expand.

How do I make such a red circle notification?

must I create 100 images or can I use custom notification like text? Can i join two images together?

I found this:

http://www.framentos.com/en/android-tutorial/2012/02/20/how-to-create-a-custom-notification-on-android/

Custom notification layouts and text colors

But I still don't know how to create this red circle. With this i know how to create blue circle but this I don't need. I am not creating battery!

Any ideas?

Community
  • 1
  • 1
mbrc
  • 3,523
  • 13
  • 40
  • 64

1 Answers1

4

The only text that you can put in the notification area/status bar ("red circle") is ticker text, which disappears after it's displayed (setTicker). The purpose of that area is to remind users that a notification is outstanding, using the small icon (setSmallIcon). You could make 100 different icons, one for each percentage, but then you would not be using Android's standard design guidelines for notifications.

I suggest that if you want a battery indicator, use 5 battery icons. One icon would be a "full" battery, along with 1 each for 75%, 50%, 25%, and "very low" (in red). I suspect that most users don't need to see exactly how much battery they have left in the status bar. You can then show the exact numbers and estimated time remaining in the full notification.

Joe Malin
  • 8,621
  • 1
  • 23
  • 18