0

I'm trying to make textView with links clickable. it works fine but the problem when the linkified piece of text is at beginning or middle, it doesn't work. it only shows text as being at link but when click it, it doesn't open. However, when the text is completely in English , it works perfectly.

I tried different methods to linkify my textview.

first using html text.

tv.setText(Html.fromHtml(myText));

second one by using Linkify API from android.

    Linkify.addLinks(tv, regex, scheme, null, mentionFilter);
    tv.setMovementMethod(LinkMovementMethod.getInstance());

both of them have the same result and non of them work when there is arabic text. only works when the link at last of the text.

1 Answers1

0

I had the same problem, but this solution worked fine for me

textView.setText(getString(R.string.details)+Html.fromHtml(getString(R.string.mail_link)));
Linkify.addLinks(textView, Linkify.ALL);