I cannot get the method for this but how can I set/modified a String in a sentence with an underline in a textview? i wanted like this, when i click the button the underline will move to the next string and click again the underline will move again. I really don't know what type of code or what kind of method is using for like this or what ever call for this.
example 1: _the_ red fox jumps over the lazy dog.
if the button is click then the underline should be in "the".
example 2: the _red_ fox jumps over the lazy dog.
if the button is click again then the underline should be in "red".
and so on.
I am new in this type of method i cannot search about this kind of code. Please help me for this kind of code Thank you.
UPDATE:
how can i set a underline code for like this:
The _***_ *** ***** **** *** **** ***.
and when i click again the button the under move again like this:
The *** _***_ ***** **** *** **** ***.
You should use
UnderlineSpan
Try thisWhen you click you should pass base string and highlight string you want