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

Reply
New Developer
Posts: 6
Registered: ‎12-17-2009
My Device: Pearl 8120
My Carrier: O2

SVG Cursor & ability to click on a link in an SVG graphic !!!

Hi,

 

I'm working on extending support for an existing charting application to blackberry.  The application outputs charts as SVG and the charts can be rendered on any browser supporting SVG,  such as Firefox, Opera, and lots of cell / mobile phones.

 

The biggest problem is that the charts are interactive,  where you can click on portion of the chart and cause the browser to navigate to another chart or page.   We can't get this to work in the Blackberry.

 

We tried it on the Blackberry simulator,  and on a Pearl 8210,  but in both cases there is no cursor on the screen that can be moved over a link to click it.   If you click the tracker ball it does activate the first link on the chart, and that bit works fine.  We just can't give the user a choice of which link to click on.

 

I found a document presented at SVG Open 2009,   see this link - Using SVG to render content rich maps on mobile devices

The author, who may work for RIM, mentions the same problem,  lack of a cursor, and goes on to say

 

We experimented with this approach using trackball based BlackBerry devices and found that using a custom cursor was rather tedious and did not provide a good user experience. The other way to work around this issue would be to create focus orders in the SVG image such that the user would be able to focus on certain elements( pre-determined by the developer) in a focus order

 

I would be interested in how the custom cursor was constructed,  to see if it would offer a solution.  Alternatively,  the 'focus order' might work,  but how to change between links (assuming we could indicate to the user which link had focus)?

 

Any help appreciated.

Developer
Posts: 43
Registered: ‎12-09-2009
My Device: 9500
My Carrier: Rogers

Re: SVG Cursor & ability to click on a link in an SVG graphic !!!

I don't think I can help you regarding the custom cursor solution but I might be able to help you with the focus order technique.

 

You will likely need to change your SVG to show when an object has the focus.  Perhaps, you can animate a focus ring around the hot item or change the color of the text if its a hyperlink. 

 

To change the order of the focusable items within your charts you can use Composer  (ThemeStudio)  to rearrange the objects within each layer or screen.   Using Composer you can use the Objects panel and change the order of the objects by dragging them around in the list. The object at the top of the list get the focus first and then the second objects, etc... 

 

I believe the focus order is based on the order of visibility.

 

Hope that helps

 

 

New Developer
Posts: 6
Registered: ‎12-17-2009
My Device: Pearl 8120
My Carrier: O2

Re: SVG Cursor & ability to click on a link in an SVG graphic !!!

Hi EThemes,

 

Thanks for that.  Focus order sounds like an interesting angle to explore, and it may be possible to build in to the SVG for our application some indication when an object has focus. 

 

The first question that comes to mind though is how to change focus?  Will the trackerball move the focus from one object to another,  or is there another keyboard key, or another way?

 

Thanks

Developer
Posts: 43
Registered: ‎12-09-2009
My Device: 9500
My Carrier: Rogers

Re: SVG Cursor & ability to click on a link in an SVG graphic !!!

Yes, I believe the trackball will do that for you. I think you only get the four directions, up, down, left and right.  I'm not exactly sure which direction the left and right will parallel,  left==up and right==down? You will have to experiment.

Highlighted
New Developer
Posts: 6
Registered: ‎12-17-2009
My Device: Pearl 8120
My Carrier: O2

Re: SVG Cursor & ability to click on a link in an SVG graphic !!!

Ok, great,  I will give it a try.   Thanks again.