How to move to another view by click on text view with two different words.
this is the string i am using.
By clicking Sign Up, you are indicating that you have read and agree to the
Term of Use and Privacy Policy.
i want to make these two words (Term of Use, Privacy Policy) in different color and clickable..
i know ho to make color for a particular word. i want to make it clickable .
I finally figured it out how to have multiple clickable parts in a TextView.
It is important that they all have their own ClickableSpan! That is where I went wrong the first time testing it. If they have the same ClickableSpan instance, only the last set span is remembered.
I created a String with the required clickable area’s surrounded by “[” and “]”.
and here is the set TextView, the setMovementMehthod is also mandatory:
I have created this function, which will handle the creation of the clickable area’s: