How to get hyper link text from HTML widget with touch events | developer.brewmp.com How to get hyper link text from HTML widget with touch events | developer.brewmp.com

Developer

How to get hyper link text from HTML widget with touch events

Forums:

Hi,

We are working on a HTML widget screen to display text which contains phone numbers and emails ID's. We are including sample@test.com or 1234567890 this HTML tags to high light the email ID's and phone numbers in HTML widget.

With keyhandling we are able to move the foucs from one link to anothe link. But the problem is with touch handling. with touch handlng we are not getting any event except "EVT_HVM_FOCUS" event along with focus position element. This we are getting all the time and where ever we click. more over its not moving focus correctly. few times it will focus and few times it will not foucs.

How to focus the hypetlink text and how to get that highlighted hyperlink text with touch events? is this possible to highlight and get hyperlink text with tocuh events ? if so can any one guide me with samle code snippets ?

 

 HTML widget display process:

1. Im creating a root container and HTML widgte first.

2. Setting text to HTML widgets and decorating that HTML widget to view port.

3. Inserting that viewport to root container.

4. Handling IWidget_handleevent with rootwidget in EVT_POINTER_DOWN and EVT_POINTER_UP events.

 

Thanks in advance

 

Lokesh Chowdary.

Hi Atul,
I followed the same steps to build the HTML widget with hyper links. Im getting EVT_HVM_FOCUS event but im not getting EVT_HVM_JUMP. Im handling Rootwidget with both EVT_POINTER_DOWN and EVT_POINTER_UP events. Highlighting hyper link text is happening correctly but if I click on highlighted text im not getting call back to listener even though widget handling returns true with both DOWN and UP events.
I need to add any properties to get that JUMP event ? is it ok if we add hyper link test in this way "sample@test.com" ? if its not ok .. please suggest me any way to get the JUMP event
 
Regards
Lokesh Chowdary.

Hi Atul,
I followed the same steps to build the HTML widget with hyper links. Im getting EVT_HVM_FOCUS event but im not getting EVT_HVM_JUMP. Im handling Rootwidget with both EVT_POINTER_DOWN and EVT_POINTER_UP events. Highlighting hyper link text is happening correctly but if I click on highlighted text im not getting call back to listener even though widget handling returns true with both DOWN and UP events.
I need to add any properties to get that JUMP event ? is it ok if we add hyper link test in this way "sample@test.com" ? if its not ok .. please suggest me any way to get the JUMP event
 
Regards
Lokesh Chowdary.

Hi Lokesh, hope you followed the same steps (code) as I mentioned in post above. I tried and I was able to get both focus change and jump events. On first click I get focus change and if I click on focused item I get jump event.
I think the way you added hyperlink is wrong. Here is how I added hyperlink in HTML: "About us"

Hi Lokesh, hope you followed the same steps (code) as I mentioned in post above. I tried and I was able to get both focus change and jump events. On first click I get focus change and if I click on focused item I get jump event.
I think the way you added hyperlink is wrong. Here is how I added hyperlink in HTML: "About us"

Sorry atul .. its my mistake I missed some thing and now I rectified it and getting JUMP events. Its working fine now. thanks
In forums for HTML widget scrolling i saw a reply form u as "HTML Widget doean't support live scrolling by default but you can wrap
viewport decorator around it or extend handlevent to achieve live
scrolling."
What is that extend handlevent ?? how we can do scrolling with out viewport or scroll widget ? please let me know.
Regards,
Lokesh chowdary.
 

Sorry atul .. its my mistake I missed some thing and now I rectified it and getting JUMP events. Its working fine now. thanks
In forums for HTML widget scrolling i saw a reply form u as "HTML Widget doean't support live scrolling by default but you can wrap
viewport decorator around it or extend handlevent to achieve live
scrolling."
What is that extend handlevent ?? how we can do scrolling with out viewport or scroll widget ? please let me know.
Regards,
Lokesh chowdary.
 

Hi Atul,
I haven't wrapped HTML widget with view port or with scroll widget. Im able to scroll HTML widget with key handlings but scrolling with tocuh events are not happening. As u mentioned in other threads "extend handlevent" means with touch events also need to handled like key events ? Scroll will work if we set the HTML widget extent based on text size. If we set extent to deviceinfo CY screen and if text is more than that then im unable to scroll the HTML widget with touch events. Please help me in this regard
 

Hi Atul,
I haven't wrapped HTML widget with view port or with scroll widget. Im able to scroll HTML widget with key handlings but scrolling with tocuh events are not happening. As u mentioned in other threads "extend handlevent" means with touch events also need to handled like key events ? Scroll will work if we set the HTML widget extent based on text size. If we set extent to deviceinfo CY screen and if text is more than that then im unable to scroll the HTML widget with touch events. Please help me in this regard
 

You need to add custom event handler for HTML widget. Please see IWidget_SetHandler(), HANDLERDESC_INIT, HANDLERDESC_CALL API reference for details on adding your own event handler in widget mechanism. For live scrolling, you have to write logic in custom handler you added based on pointer events.

You need to add custom event handler for HTML widget. Please see IWidget_SetHandler(), HANDLERDESC_INIT, HANDLERDESC_CALL API reference for details on adding your own event handler in widget mechanism. For live scrolling, you have to write logic in custom handler you added based on pointer events.

Thanks Atul Every thing is working fine with the above mentioned Sethandler and HandlerDesc APIs. Im able to do a live scroll. 
 
Lokesh Chowdary.

Thanks Atul Every thing is working fine with the above mentioned Sethandler and HandlerDesc APIs. Im able to do a live scroll. 
 
Lokesh Chowdary.