Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Themes & Animated Graphics


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 25
Registered: ‎12-21-2009
My Device: BlackBerry Z10
My Carrier: Verizon

SVG Grouping Today Elements

Does anyone know if there is a way to group (<g>) today elements (#calendar1hotspot) in SVG and then be able to show/hide the entire group of today elements.  Or can we only show/hide each individual element.  I have tried a number of different ways to do this (grouping) and have been unsuccessful.

New Developer
Posts: 7
Registered: ‎11-15-2008
My Device: Not Specified

Re: SVG Grouping Today Elements

I just recently learned this myself. In the SVG using a text editer, code has to be added.

Here's a sample:

 

<g id="calendar">
<set xlink:href="#hs0_line" attributeName="display" to="none" begin="0"/>
<set xlink:href="#hs0" attributeName="display" to="none" begin="0"/>
<set xlink:href="#calendar1hotspot" attributeName="display" to="none" begin="0"/>
<set xlink:href="#calendar2hotspot" attributeName="display" to="none" begin="0"/>

 

now its not just this. its a sample you can use to your needs as long as you remember the following things:

where you see "#hs0",  the 0 must match the order you added today itens in TB5. If "calendar was added second, then its "#hs1", third is #hs2 and so on...

At "begin="...0 means hidden upon activation of theme, 1 means shown.

                       to activate it with a icon button press use "NAME OF BUTTON.activate" ex: "Theme_Button_1.activate" or whatever you named your button in Composer. on focus in, use ".focusin" and ".focusout" for focus out.

                       To show it with a keypress (like when you press $ to show it), that would be

                       to="inline" begin="accessKey($)"

                       To hide it   to="inline" would read  to="none"

 

i only know how to do this with SMS and MMS   <g id="smsandmms">    "#sms1hotspot"

                                                        Calendar      see code at top of post above

                                                 and Messages     <g id="messages">    "#messages1hotspot"

 

 

now this will fully work as long as you remember how many enteries you add to each today item. The following code is a sample of 3 today items (SMS, Messages, and Calendar....In that order) each with 2 enteries each. For this sample we'll have it hidden at start, use $ to show them and use the back button to hide them:

 

<g id="smsandmms">
<set xlink:href="#hs0_line" attributeName="display" to="none" begin="0"/>
<set xlink:href="#hs0" attributeName="display" to="none" begin="0"/>
<set xlink:href="#sms1hotspot" attributeName="display" to="none" begin="0"/>
<set xlink:href="#sms2hotspot" attributeName="display" to="none" begin="0"/>
<set xlink:href="#hs0_line" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#hs0" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#sms1hotspot" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#sms2hotspot" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#hs0_line" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#hs0" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#sms1hotspot" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#sms2hotspot" attributeName="display" to="inline" begin="accessKey($)"/>
</g>
<g id="messages">
<set xlink:href="#hs1_line" attributeName="display" to="none" begin="0"/>
<set xlink:href="#hs1" attributeName="display" to="none" begin="0"/>
<set xlink:href="#messages1hotspot" attributeName="display" to="none" begin="0"/>
<set xlink:href="#messages2hotspot" attributeName="display" to="none" begin="0"/>
<set xlink:href="#hs1_line" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#hs1" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#messages1hotspot" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#messages2hotspot" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#hs1_line" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#hs1" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#messages1hotspot" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#messages2hotspot" attributeName="display" to="inline" begin="accessKey($)"/>
</g>
<g id="calendar">
<set xlink:href="#hs2_line" attributeName="display" to="none" begin="0"/>
<set xlink:href="#hs2" attributeName="display" to="none" begin="0"/>
<set xlink:href="#calendar1hotspot" attributeName="display" to="none" begin="0"/>
<set xlink:href="#calendar2hotspot" attributeName="display" to="none" begin="0"/>
<set xlink:href="#hs2_line" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#hs2" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#calendar1hotspot" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#calendar2hotspot" attributeName="display" to="none" begin="accessKey(ESCAPE)"/>
<set xlink:href="#hs2_line" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#hs2" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#calendar1hotspot" attributeName="display" to="inline" begin="accessKey($)"/>
<set xlink:href="#calendar2hotspot" attributeName="display" to="inline" begin="accessKey($)"/>
</g>

 

I hope this helps!

                     

Developer
Posts: 25
Registered: ‎12-21-2009
My Device: BlackBerry Z10
My Carrier: Verizon

Re: SVG Grouping Today Elements

I know how to show the today items such as this:

<set xlink:href="#hs0" attributeName="display" to="inline"   begin="accessKey(x)"/>
<set xlink:href="#calendar1hotspot" attributeName="display" to="inline"   begin="accessKey(x)"/>
<set xlink:href="#calendar2hotspot" attributeName="display" to="inline"   begin="accessKey(x)"/>
<set xlink:href="#calendar3hotspot" attributeName="display" to="inline"   begin="accessKey(x)"/>
<set xlink:href="#calendar4hotspot" attributeName="display" to="inline"   begin="accessKey(x)"/>
<set xlink:href="#calendar5hotspot" attributeName="display" to="inline"   begin="accessKey(x)"/>
<set xlink:href="#calendar6hotspot" attributeName="display" to="inline"   begin="accessKey(x)"/>
<set xlink:href="#calendar7hotspot" attributeName="display" to="inline"   begin="accessKey(x)"/>

 

What I want to be able to do is something like this:

<g id="Calendar">

<use xlink:href="#hs0"/>
<use xlink:href="#calendar1hotspot"/>
<use xlink:href="#calendar2hotspot"/>
<use xlink:href="#calendar3hotspot"/>
</g>

 

<set xlink:href="Calendar" attributeName="display" to="inline" begin="accessKey(x)"/>

 

However, that code as is does not work.