Obsolete
Status Update
Comments
en...@gmail.com <en...@gmail.com> #2
Thanks for the report. This should work if you do
setMovementMethod(LinkMovementMethod.getInstance()) but you're right that it would be
good for it to work without you having to do that.
setMovementMethod(LinkMovementMethod.getInstance()) but you're right that it would be
good for it to work without you having to do that.
m....@gmail.com <m....@gmail.com> #3
That worked, thanks!
sa...@gmail.com <sa...@gmail.com> #4
It does not work for me!
when touched its changing color, thats it, nothing else happens.
like launching of browser. SOS!
when touched its changing color, thats it, nothing else happens.
like launching of browser. SOS!
al...@gmail.com <al...@gmail.com> #5
[Comment deleted]
al...@gmail.com <al...@gmail.com> #6
[Comment deleted]
al...@gmail.com <al...@gmail.com> #7
I've got the same problem : color changes and nothing more... :(
I've found the solution : if you use getString for string resources, do not integrate html in your xml. You have to externalize html. For example :
your xml won't contain : <string name="mystring"><a href='#'>link</a></string>
but only : <string name="mystring">link</string>
and then use it as :
textView.setText(Html.fromHtml("<a href='#'>"+getString(R.string.mystring)+"</a>"));
Enjoy :)
I've found the solution : if you use getString for string resources, do not integrate html in your xml. You have to externalize html. For example :
your xml won't contain : <string name="mystring"><a href='#'>link</a></string>
but only : <string name="mystring">link</string>
and then use it as :
textView.setText(Html.fromHtml("<a href='#'>"+getString(R.string.mystring)+"</a>"));
Enjoy :)
ne...@gmail.com <ne...@gmail.com> #8
I am facing problem in formating and setting text view in android if any special character comes(starting Html tags like < and </) during Html formatting
TextView tv;
String subject = "My heart <3 is paining and breaking </3 after this";
tv.setText(Html.fromHtml("<b>"+subject+"</b>");
in this case string automatically truncate after < or </ .
Please go through this and help me out.
TextView tv;
String subject = "My heart <3 is paining and breaking </3 after this";
tv.setText(Html.fromHtml("<b>"+subject+"</b>");
in this case string automatically truncate after < or </ .
Please go through this and help me out.
ne...@gmail.com <ne...@gmail.com> #9
I am facing problem in formating and setting text view in android if any special character comes(starting Html tags like < and </) during Html formatting
TextView tv;
String subject = "My heart <3 is paining and breaking </3 after this";
tv.setText(Html.fromHtml("<b>"+subject+"</b>");
in this case string automatically truncate after < or </ .
Please go through this and help me out.
TextView tv;
String subject = "My heart <3 is paining and breaking </3 after this";
tv.setText(Html.fromHtml("<b>"+subject+"</b>");
in this case string automatically truncate after < or </ .
Please go through this and help me out.
ar...@gmail.com <ar...@gmail.com> #10
If you externalize your string, use the CDATA notation if you want the links to work. For example:
<string
name="signup_fine_print"><![CDATA[Foo bar bar\'s
<a href="http://www.foo.com/about/tos ">Terms of Service</a>]]>
</string>
<string
name="signup_fine_print"><![CDATA[Foo bar bar\'s
<a href="
</string>
en...@google.com <en...@google.com>
ph...@gmail.com <ph...@gmail.com> #11
Can we implement multiple link on TextView any how?
aw...@gmail.com <aw...@gmail.com> #12
[Comment deleted]
[Deleted User] <[Deleted User]> #13
When we got wrong link from server then application is crashing.
How to Handle this crash please tell me??
How to Handle this crash please tell me??
an...@gmail.com <an...@gmail.com> #14
Why was this set to obsolete?
[Deleted User] <[Deleted User]> #15
If this is obsolete, what is the recommended solution?
Description
Your development environment: Eclipse 3.4.1
Describe the problem:
When loading valid HTML anchors via android.text.Html.fromHtml() and
rendering them in a TextView, the resulting links are not clickable.
Steps to reproduce:
1. String html = "<a href='#'>link</a>"
2. textView.setText(Html.fromHtml(html), TextView.BufferType.SPANNABLE);
3. Run app
4. click the link in view
Expected results:
browser opens the clicked link
Observed results:
the links rendered do not respond to click events.