I want to display a text where certain words lead to other activities within the application. Is there a more convenient way to achieve it other than having a bunch of TextViews along with buttons (with the clickable words and a transparent background) side by side?
Asked
Active
Viewed 67 times
3 Answers
0
Just the bunch of TextViews and their onClick(s) should do, you wouldn't need the Buttons..

achu
- 29
- 4
0
You can take a look at the Linkify class, that searches for some predefined links in the text such as phone numbers, e-mail addresses and web links and automatically makes them clickable and leading to the corresponding activities when clicked. I think there is a possibility of adding your own pattern to recognize words in the text and bind them to activities you want to be used for those words. Hope this helps.

Egor
- 39,695
- 10
- 113
- 130
0
Please check both of the links
http://blog.elsdoerfer.name/2009/10/29/clickable-urls-in-android-textviews/