5,600,053 Members 43,799 Now Online
XDA Developers Android and Mobile Development Forum

Zooper Coding Question About Displaying a Non Count

Tip us?
 
purple_snow
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 7
Join Date: Oct 2013
Location: San Diego
Default Zooper Coding Question About Displaying a Non Count

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!
 
ma11en
Old
(Last edited by ma11en; 26th February 2014 at 06:16 PM.)
#2  
ma11en's Avatar
Member
Thanks Meter 37
Posts: 77
Join Date: Jun 2012
Location: Nottingham
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
 
Bricks4ck
Old
#3  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Mar 2014
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
 
ma11en
Old
#4  
ma11en's Avatar
Member
Thanks Meter 37
Posts: 77
Join Date: Jun 2012
Location: Nottingham
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
 
rkucheran
Old
#5  
rkucheran's Avatar
Senior Member
Thanks Meter 1142
Posts: 613
Join Date: May 2008
Location: Kingston, Canada
Quote:
Originally Posted by purple_snow View Post
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
 
killakarl
Old
#6  
killakarl's Avatar
Senior Member
Thanks Meter 191
Posts: 794
Join Date: Aug 2010
Location: Pittsburgh, PA
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
 
ma11en
Old
#7  
ma11en's Avatar
Member
Thanks Meter 37
Posts: 77
Join Date: Jun 2012
Location: Nottingham
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: [ Click to Expand ]
 
killakarl
Old
#8  
killakarl's Avatar
Senior Member
Thanks Meter 191
Posts: 794
Join Date: Aug 2010
Location: Pittsburgh, PA
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:	41
Size:	72.4 KB
ID:	2619218  
 
kwerdenker
Old
#9  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 1555
Posts: 1,232
Join Date: Apr 2010
Location: Probably the Zooper Forums
Quote:
Originally Posted by killakarl View Post
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
Mobile: LG Nexus 4 | ROM: Paranoid Android 4.0 + Xposed | Kernel: faux Kernel
Tablet: Asus Nexus 7 (2013) | ROM: Paranoid Android 3+ | Kernel: faux Kernel


The Following User Says Thank You to kwerdenker For This Useful Post: [ Click to Expand ]
 
killakarl
Old
#10  
killakarl's Avatar
Senior Member
Thanks Meter 191
Posts: 794
Join Date: Aug 2010
Location: Pittsburgh, PA
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Control TWRP from within Android with TWRP Coordinator

You may recall that back when TWRP2 introduced a couple of years ago, it brought with … more

Keep Track of Everything Your Device Does with Event Logger

Regardless of their OS choice, computing power users generally share one common … more

A More Competitive Spin on the Addictive 2048 Puzzle

You may recall that a few weeks ago, we talked about a rather interesting take on … more

Multiboot in Progress for the Sony Xperia Z1

As we’ve mentioned quite a few times in the past, multiboot is quite the interesting … more