5,599,478 Members 39,109 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Colours for temperatures

Tip us?
 
Sokudoningyou
Old
#1  
Sokudoningyou's Avatar
Senior Member - OP
Thanks Meter 37
Posts: 238
Join Date: Jan 2011
Location: Milwaukee suburbia
Default [Q] Colours for temperatures

I saw someone else had asked a similar question, but I tried that answer's template, and then also the website, and neither is working, sooo....

I'm using text (not rich text, does this matter?) to tell me the current conditions and the temperature. I tried using the conditional code in the "edit text manually" section, and then, in the "advanced parameters" section. So far, I have #WCCOND#, #WCTEMPN#$<=32?[c]#00ffff[/c]$, to change the temperature to a light blue when it's 32 or below. This was also trial and error: the other two attempts based off the examples I tried, the temperature entirely disappeared: now, at least, it's still visible, but it's not turning blue even though it's 19 outside. Am I writing this code wrong?
 
CopKiller76
Old
#2  
Member
Thanks Meter 38
Posts: 73
Join Date: Jan 2014
Location: Bornheim
If you want to change the color of the temperature only, use [c]$#WCTEMPN#<=32?#ff00ffff:#ff000000$[/c] in advanced parameters and #WCTEMPN# as text.

Sent from GT-I9505 via Tapatalk
The Following User Says Thank You to CopKiller76 For This Useful Post: [ Click to Expand ]
 
Sokudoningyou
Old
(Last edited by Sokudoningyou; 31st January 2014 at 06:30 PM.)
#3  
Sokudoningyou's Avatar
Senior Member - OP
Thanks Meter 37
Posts: 238
Join Date: Jan 2011
Location: Milwaukee suburbia
Quote:
Originally Posted by CopKiller76 View Post
If you want to change the color of the temperature only, use [c]$#WCTEMPN#<=32?#ff00ffff:#ff000000$[/c] in advanced parameters and #WCTEMPN# as text.

Sent from GT-I9505 via Tapatalk
Does it matter if it's text, or rich text?

....also, I'm using six number colour codes, does that make a difference?

Nevermind, I think I've got it. I'm just a little annoyed that between your example, the website's example, and someone else, the code doesn't seem to match
 
CopKiller76
Old
#4  
Member
Thanks Meter 38
Posts: 73
Join Date: Jan 2014
Location: Bornheim
Doesnt matter richtext only has a few more options.

Sent from GT-I9505 via Tapatalk
 
Sokudoningyou
Old
#5  
Sokudoningyou's Avatar
Senior Member - OP
Thanks Meter 37
Posts: 238
Join Date: Jan 2011
Location: Milwaukee suburbia
Quote:
Originally Posted by CopKiller76 View Post
Doesnt matter richtext only has a few more options.

Sent from GT-I9505 via Tapatalk
Okay, so then, if I use the Advanced Parameters, is it going to affect everything within the module? I'm trying to apply this idea to my battery stats, using #BSTAT#, #BLEV#, and #BLEFT#. All three are present in the module, but in Advanced Parameters, I'm only trying to apply a change in colour (like the website example) to #BLEV#. However, it changes all three instead of just one.
 
CopKiller76
Old
(Last edited by CopKiller76; 31st January 2014 at 08:27 PM.)
#6  
Member
Thanks Meter 38
Posts: 73
Join Date: Jan 2014
Location: Bornheim
The change in advanced is for the complete module. In this case you have to use rich text and try doing this with bb-code.

Sent from GT-I9505 via Tapatalk

---------- Post added at 08:20 PM ---------- Previous post was at 08:12 PM ----------

Try this #BSTAT# $#BLEVN#<=30?[c=#ffff0000]#BLEV#[/c]:[c=#ff00ff00]#BLEV#[/c]$ #BLEFT#

Sent from GT-I9505 via Tapatalk
 
Sokudoningyou
Old
#7  
Sokudoningyou's Avatar
Senior Member - OP
Thanks Meter 37
Posts: 238
Join Date: Jan 2011
Location: Milwaukee suburbia
Quote:
Originally Posted by CopKiller76 View Post
The change in advanced is for the complete module. In this case you have to use rich text and try doing this with bb-code.

Sent from GT-I9505 via Tapatalk

But can BBC code change the colour dynamically as well?
 
CopKiller76
Old
#8  
Member
Thanks Meter 38
Posts: 73
Join Date: Jan 2014
Location: Bornheim
Example added.

Sent from GT-I9505 via Tapatalk
 
Sokudoningyou
Old
#9  
Sokudoningyou's Avatar
Senior Member - OP
Thanks Meter 37
Posts: 238
Join Date: Jan 2011
Location: Milwaukee suburbia
Nope. Maybe I'll just try small separate widgets then.
 
CopKiller76
Old
#10  
Member
Thanks Meter 38
Posts: 73
Join Date: Jan 2014
Location: Bornheim
Quote:
Originally Posted by Sokudoningyou View Post
Nope. Maybe I'll just try small separate widgets then.
Not working for you?

Sent from GT-I9505 via Tapatalk

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes