I have a string, with two types of links inside it.
One is markdown and the other is normal link.
I want both of them to be clickable inside a textView.
This is the string :
String myString = "[google](www.google.com) www.facebook.com"
I converted myString to HTML using AndDown library.
AndDown andDown = new AndDown(); String convertedString = andDown.markdownToHtml( myString );
The value of
convertedString now :
Now if I set the textview as below :
textView.setLinksClickable(true); body.setMovementMethod(LinkMovementMethod.getInstance()); body.setText(convertedString);
This is how my textView looks like :
google is now clickable, where as www.facebook.com is not recognized as a link, it's printed as a normal word.
To solve this I used :
This made www.facebook.com clickable, but google is now not recognized as link, but is displayed as a normal word.
So, I need a solution to make them both clickable, without trading off either of them.