I have the following TextView defined:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/txtCredits"
android:autoLink="web"
android:id="@+id/infoTxtCredits"
android:layout_centerInParent="true"
android:linksClickable="true">
where
@string/txtCredits
is a string resource that contains
Link
.
text
Android is
highlighting the links in the TextView, but they do not respond to clicks. Can someone
tell me what I'm doing wrong? Do I have to set an onClickListener for the TextView in my
activity for something as simple as this?
Looks
like it has to do with the way I define my string resource.
This does not
work:
name="txtCredits"> href="http://www.google.com">Google
But
this does:
name="txtCredits">www.google.com
Which
is a bummer because I would much rather show a text link than show the full URL.
No comments:
Post a Comment