0

I am new to android development and was working on a project which involved in underlining specific words in the text field while typing I found an example on dribble which achieves the same thing:

Dribble Image

Here I have the index of the word in the string which I want to underline. Is there any way to achieve this? Thank you

Please Note: I don't want to know about how to find the substrings as mentioned in the video but I want to achieve the same underline animation as shown in the video

Is there any way that we can have a canvas behind the EditText and then have the underline animation there??

Karan Gandhi
  • 303
  • 1
  • 2
  • 15
  • I am not sure about the same animation which looks like a custom one for sure, but I found a repo with the same built-in animations for texts: https://github.com/hanks-zyh/HTextView – Jagar Aug 01 '20 at 15:19
  • But it is applied on the whole string and not a word. I would like to have the underline style to a specific word – Karan Gandhi Aug 01 '20 at 15:28
  • You will need a kind of rich text editor so this could be helpful https://stackoverflow.com/questions/4283755/implementing-a-rich-text-editor-in-android – Jagar Aug 01 '20 at 15:51
  • https://stackoverflow.com/a/50736316/12053756 – Jagar Aug 01 '20 at 15:52

0 Answers0