Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,725 Members 37,887 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Problem - Display Alarm set time only if enabled

Tip us?
 
SX86
Old
#1  
Member - OP
Thanks Meter 7
Posts: 64
Join Date: May 2010
Location: QC
Default [Q] Problem - Display Alarm set time only if enabled

Hello!

I am trying to figure out a way to make one of my "rich text" modules only display if the alarm is enabled.

I used to only use the following line : "Next alarm is set for #SADEEEE# at #SADHH:mm#" that would display "Next alarm is set for at " if no alarm was set.

I updated the coding of the line for the following :

$#SASET#=1?Next alarm is set for #SADEEEE# at #SADHH:mm#$

But now, the result that is displayed is : "mm#"

I'm not sure I can figure out what I did wrong for this to display, since it was working without the "Write Z only if X is equal to Y"

Any help would be appreciated!
 
CopKiller76
Old
#2  
Senior Member
Thanks Meter 68
Posts: 121
Join Date: Jan 2014
Location: Bornheim
You have to write #SADHH\:mm# otherwise zooper will see the : as an else.

Gesendet von meinem GT-I9505 mit Tapatalk
The Following 2 Users Say Thank You to CopKiller76 For This Useful Post: [ Click to Expand ]
 
SX86
Old
#3  
Member - OP
Thanks Meter 7
Posts: 64
Join Date: May 2010
Location: QC
Quote:
Originally Posted by CopKiller76 View Post
You have to write #SADHH\:mm# otherwise zooper will see the : as an else.
Works! Thank you so much!
 
masze
Old
#4  
masze's Avatar
Senior Member
Thanks Meter 736
Posts: 1,079
Join Date: May 2010
Location: Sweden
or just put this is advanced parameters:
[ar]$#SASET#=1?1:1000000$[/ar]


Samsung Note 3 | MultiX ROM |Lean
Samsung Galaxy S III | Temasek CM11 | Temasek
Samsung Galaxy S II | Stock 4.1.2 | Stock
Samsung Galaxy S | Stock 2.3.6 | Stock
Samsung Galaxy 10.1 | Stock 4.0.4 | Stock


 
SX86
Old
#5  
Member - OP
Thanks Meter 7
Posts: 64
Join Date: May 2010
Location: QC
Quote:
Originally Posted by masze View Post
or just put this is advanced parameters:
[ar]$#SASET#=1?1:1000000$[/ar]
Thanks for the alternative!

Would you mind explaining how the quoted expression works?
Tags
$x=y?z$, alarm
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes