What im trying to accomplish is something that is standard in most twitter apps, in a textview there may be an "@" mention or a "#" hashtag preceding a word in a text string and they are actually able to add a click listener onto that word that launches another activity, does anyone know how this is achieved? below I have attached an example photo showing what i'm trying to achieve, any help would go a long way thanks
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
Try it this way.......
onclicklistener method :
Take a look at the Linkify class. It allows you to add Links within you TextViews, for a given regular expression.
The following has been extracted from this article: