As a part of our Android app. in Corona, we’re supposed to display a collection of texts in a scroll view, and make certain words in sentences hyperlinks to another preassigned objects. However, those texts are display objects, so they do not support in-text, standard hyperlinks.
Our idea for the solution was to create a invisible field with listener on top of the keyword, however it’s specific position is unknown due to various formatting details.
Calculating the position based on the order of sentence containing the word, font specifications, screen resolutions, wrapping, etc. would be troublesome and resource-consuming, especially noticeable as there would be hundreds of them generated dynamically in front of a user.
Question: does anyone have an idea for possible, more graceful solution? Inserting hyperlinks, or acquiring the position?
Generally, this part of the app. should look as in this template:http://imageshack.com/a/img673/4768/NjB1nt.png
white field is a scroll view, containing 6 displayNewText obects. The keyword is “art.166” displayed with a blue color font, it should work as a hyperlink.
blue field is the popup object called by hyperlink.