tags:

views:

85

answers:

3

I want to raise a notification showing an icon in the status bar - so far so good, but actually I would like this icon to be a 3 character String.

So my question is: Is there a way to convert my String into a Drawable to display it as Icon in the status bar?

EDIT: I recently found an app which does something similar - Battery Indicator

It shows the current battery level as notification icon in the status bar - I wonder if it really uses different 100 images

Screenshot

A: 

Have you looked at the API Demos > App > Notifications > Status Bar?

If you have limited number of String options (like Smileys) you can create drawables for each of those Strings.

Sameer Segal
I'd like to avoid that since it's quite a big number of possibilities :)
Martin
+1  A: 

Short: No, you can't.

Long: The notification needs a R.drawable.something for the icon and you can't create it on runtime.

Macarse
A: 

you can make your own custom drawable that would work just like the textview widget except it is a drawable instead of a view. The textview class is just a container for the drawable that contains the text.

schwiz