Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,804,641 Members 43,929 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Simple coniditionals OR query

Tip us?
 
Xave1
Old
#1  
Member - OP
Thanks Meter 8
Posts: 52
Join Date: Dec 2013
Location: London
Default [Q] Simple coniditionals OR query

Hi all,

I'd like to show wifi status not as numbers but as off / on / enabled

State in numbers being as per:

#NWSTATE# WiFi State (0 disabled, 1 enabled, 2 connected)

So far I've manage to code as follows for off or on:

Wifi $#NWSTATE#=0?disabled:enabled$

how do I modify the code to show the 3rd state of connected please?
Current: Nexus 5 Black 32GB | TWRP | Kitkat 4.4.2 | Xposed: GravityBox | Cydia Substrate: RootCloak Plus
Retired: Samsung Galaxy S3 Mini - stock
Retired: Samsung Galaxy Y - rooted
 
CopKiller76
Old
#2  
Senior Member
Thanks Meter 68
Posts: 124
Join Date: Jan 2014
Location: Bornheim
Try this
$#NWSTATE#=0?off$$#NWSTATE#=1?on$$#NWSTATE#=2?conn ected$

Sent from GT-I9505 via Tapatalk
The Following User Says Thank You to CopKiller76 For This Useful Post: [ Click to Expand ]
 
Xave1
Old
#3  
Member - OP
Thanks Meter 8
Posts: 52
Join Date: Dec 2013
Location: London
Quote:
Originally Posted by CopKiller76 View Post
Try this
$#NWSTATE#=0?off$$#NWSTATE#=1?on$$#NWSTATE#=2?conn ected$

Sent from GT-I9505 via Tapatalk
Perfect. Thank you.

Sent from my Nexus 5 using Tapatalk
Current: Nexus 5 Black 32GB | TWRP | Kitkat 4.4.2 | Xposed: GravityBox | Cydia Substrate: RootCloak Plus
Retired: Samsung Galaxy S3 Mini - stock
Retired: Samsung Galaxy Y - rooted
Tags
conditional, zooper
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes