FORUMS

Discover XDA: Discover Greater

We’ve all been there at some point in our XDA lives; we used to spend hours browsing over the … more

XPrivacy for Android Lollipop – XDA Xposed Tuesday

Have you ever been on the Google Play Store and saw an app that you wanted to … more

How a HTC Droid Eris Changed a Members Life

Rarely can a member say that Android development or XDA had a profound effect on … more

XDA Office Space: Frankenstein’s Perfect IM Client?

The portal’s decentralized XDA office lies in a Hangouts chatroom, where … more
Post Reply Subscribe to Thread Email Thread

Zooper Coding Question About Displaying a Non Count

25th February 2014, 11:48 PM |#1  
OP Junior Member
Flag San Diego
Thanks Meter: 0
 
More
I search for this answer and no luck.

What would be the code for when an item (calls, Gmail, or SMS) is 0 it displays nothing or blank; and when there is a count of 1+ it does display?

I tried several times with no good results.

Thank you!
 
 
26th February 2014, 06:13 PM |#2  
ma11en's Avatar
Senior Member
Flag Nottingham
Thanks Meter: 51
 
More
Hi,

Put this in the Advanced Parameters section of the module you use to display the count.

[c]$#SUSMS#=0?00000000$[/c]

It changes the text colour to transparent, when the count is 0, this for SMS you will need to change the SUSMS to SMCALLS for missed calls and SUG for Gmail.

Regards Mark.

Sent from my One X using Tapatalk
Last edited by ma11en; 26th February 2014 at 06:16 PM.
1st March 2014, 03:10 PM |#3  
Junior Member
Thanks Meter: 2
 
More
So I've tried this and its not working for me. I have my numbers to text witch shouldn't matter seeing how its still read as a number. But doesn't work?

Sent from my SCH-I605 using Tapatalk
1st March 2014, 11:01 PM |#4  
ma11en's Avatar
Senior Member
Flag Nottingham
Thanks Meter: 51
 
More
Hi,

Try this in the Manual Text entry of a Rich Text module;

$#SUSMS#>0?[nt]#SUSMS#[/nt]$

This time we are choosing only to display text if the count is above 0, rather than manipulate colour.

The colour is set in the normal way the module, no need for Advanced Parameters this time.

I hope this works, took a bit of head scratching

Regards Mark.

Sent from my One X using Tapatalk
2nd March 2014, 05:00 PM |#5  
rkucheran's Avatar
Recognized Themer
Flag Kingston, Canada
Thanks Meter: 11,298
 
Donate to Me
More
Quote:
Originally Posted by purple_snow

I search for this answer and no luck.

What would be the code for when an item (calls, Gmail, or SMS) is 0 it displays nothing or blank; and when there is a count of 1+ it does display?

I tried several times with no good results.

Thank you!

Or

$#SUSMS#=0? :#SUSMS#$

Mine will be numbered. Above looks to be written ie. Two instead of 2
7th March 2014, 06:44 AM |#6  
killakarl's Avatar
Senior Member
Flag Pittsburgh, PA
Thanks Meter: 269
 
More
I have a question. I have two sets of icons one black and one white, I want the black one to show until there is a notification. I want the white one to show if there is. Is this possible?

Sent from my SM-N900P using XDA Premium 4 mobile app
7th March 2014, 07:31 PM |#7  
ma11en's Avatar
Senior Member
Flag Nottingham
Thanks Meter: 51
 
More
Hi,

Try this;

create a new bitmap module and choose the image for 0 count as normal then enter the following code in the Advanced Parameters section.

Replace *path* with the actual path of the image you want to display for a count above 0.


$#SUSMS#>0?*path*$

Regards Mark

Sent from my One X using Tapatalk
The Following User Says Thank You to ma11en For This Useful Post: [ View ]
8th March 2014, 12:38 AM |#8  
killakarl's Avatar
Senior Member
Flag Pittsburgh, PA
Thanks Meter: 269
 
More
Does this look right? It is not changing.

Sent from my SM-N900P using XDA Premium 4 mobile app
Attached Thumbnails
Click image for larger version

Name:	1394239106773.jpg
Views:	82
Size:	72.4 KB
ID:	2619218  
8th March 2014, 12:48 AM |#9  
kwerdenker's Avatar
Recognized Themer
Flag Probably the Zooper Forums
Thanks Meter: 2,523
 
Donate to Me
More
Quote:
Originally Posted by killakarl

Does this look right? It is not changing.

Sent from my SM-N900P using XDA Premium 4 mobile app

You need to put [*b] [*/b] tags around the path for it to work (ignore the *; see the tag overview in your screenshot)

Send from my secret moonbase via space carrier pigeons
The Following User Says Thank You to kwerdenker For This Useful Post: [ View ]
8th March 2014, 12:58 AM |#10  
killakarl's Avatar
Senior Member
Flag Pittsburgh, PA
Thanks Meter: 269
 
More
Thanks fellas. It worked. I will have to play around more with this. This is going to be fun.

Sent from my SM-N900P using XDA Premium 4 mobile app
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes