Hi everyone. I’m using [BATT_PER]>=76?-100:0 as an example to show battery icons in 25% stages. My problem is making the higher level icons disappear as the low level icons appear. How can I make 100% battery level icons disappear when 75% shows?
Remove the 100 default setting first don’t minus 100
[BATT_PER]>=76? 100:0
Boolean math both items have to be true for the 100 to show for the others
(([BATT_PER]>=51) * ( [BATT_PER]<=75 ))? 100 : 0
Ron
Samsung Developer Relations
Nice Tutorial Ron . I think it a good idea to point ot the * in the middle of the conditional is Boolean AND when it is needed + is OR . On another platform it is && or || .
My bad, I meant binary math not Boolean there are slight differences. In binary math any number (other than zero) plus zero is true (1) and any number times zero is false (0).
Ron
Samsung Developer Relations.
Sorry I do not understand that at all . I thought * was AND .
IF W>X is TRUE AND Y<Z is TRUE then Do something ELSE Do different .
Your logic is correct the asterisk is AND I just get a bit pedantic
Ron
Samsung Developer Relations
if the battery level drops to 10% or below, I want the dot to appear and disappear, I want this process to continue as a loop every 2 seconds, can you help me how to do it?
You can try to set the opacity like 0 and add this into the tags field
[BATT_PER]<=10?100*([SEC]%2):100
but I encountered a situation like this, if it is greater than 10%, the dot is still visible, I set the opacity value to 0% as you said at the beginning, but it remains visible, when the charge goes below 10%, it starts blinking.
[BATT_PER]<=10?100*([SEC]%2):0, thank you very much
Sorry, I thought you only wanted to add the blinking effect. But you figured it out.