LightBlog

mardi 17 mars 2015

[Q] multiple condition variables

hello, i've made my first widget that shows battery level with a progress bar (ram level and cpu frequency with other bars).

Now I want that the color of bar change when value is under a certain number (for example: normally is green, below 60 is yellow, below 40 is orange and below 20 is red).

I've wrote this and working: $#BLEVN#<60?[cf]#fffce109[/cf]

the logic of this is (pseudocode): if(battery.value < 60) { bar.color=yellow}

the logic that i want realize is three "if" concatenate or a "switch" (i refear to programming language).



I've tried to concatenate three of this expression but not working.

Anyone know if it can do?

thanks





from xda-developers http://ift.tt/1GYXEIC

via IFTTT

Aucun commentaire:

Enregistrer un commentaire