Reputation: 157
In case you're unfamiliar, WeatherBug has a temperature display in the status bar that will say something like "38". I'm new to android programming, but from what I can see, if you want to put something in the status bar, you have to have a drawable.
Now I know they could've made a 100+ branch if statement, but since that's unlikely, how can I achieve this?
Upvotes: 0
Views: 89
Reputation: 1007369
Off the cuff...
Step #1: Create your individual temperature drawables.
Step #2: Create a LevelListDrawable
that references those individual temperature drawables, for levels corresponding with the temperature.
Step #3: Use setSmallIcon(int, int)
to point to your LevelListDrawable
and the desired level.
Upvotes: 1