F
F
Fotonick2016-10-18 09:08:02
Android
Fotonick, 2016-10-18 09:08:02

How to make text in TextView different thickness and color?

I'm making an app similar to Instagram. It is necessary to make the text in the description of the post and in the comments non-uniform, that is, for example, the author's name is highlighted in bold (or in a different font), hashtags and user nicknames differ in color, like this
7b5a9b01e9334604abd5f1df22d3e4eb.png
How to do it within one TextView and is it done like this at all way? How to recognize hashtags and nicknames of users in order to change their color later? How to make hashtags and nicknames of users clickable in order to go to the hashtag search or to the user profile?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-10-18
@Photonick

If you are interested in a tutorial on how to do all this, then here is one of them. As for the clickability of the text, Google gives a lot of links to the query "link in textview", for example here .
For hashtags, you can also use a ready-made library, for example this one . See this for formatting text .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question