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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry Themes & Animated Graphics

Reply
Developer
langsky
Posts: 25
Registered: ‎12-21-2009
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.

Please use plain text.
New Developer
9of13
Posts: 7
Registered: ‎11-15-2008

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!

                     

Please use plain text.
Developer
langsky
Posts: 25
Registered: ‎12-21-2009
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.

Please use plain text.