diff --git a/samples/ApiDemos/res/layout/link.xml b/samples/ApiDemos/res/layout/link.xml
index d4eaf0c5b..6c034ddae 100644
--- a/samples/ApiDemos/res/layout/link.xml
+++ b/samples/ApiDemos/res/layout/link.xml
@@ -14,43 +14,55 @@
limitations under the License.
-->
-
+
-
+
-
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
+
+
+
+
diff --git a/samples/ApiDemos/res/values/strings.xml b/samples/ApiDemos/res/values/strings.xml
index 99e24635d..c63765521 100644
--- a/samples/ApiDemos/res/values/strings.xml
+++ b/samples/ApiDemos/res/values/strings.xml
@@ -1019,14 +1019,21 @@
B
C
Button
- text1: This is some text. In
+ text1: Various kinds
+ of data that will be auto-linked. In
this text are some things that are actionable. For instance,
you can click on http://www.google.com and it will launch the
- web browser. You can click on google.com too. And, if you
- click on (415) 555-1212 it should dial the phone.
+ web browser. You can click on google.com too. If you
+ click on (415) 555-1212 it should dial the phone. Or just write
+ foobar@example.com for an e-mail link. If you have a URI like
+ http://www.example.com/lala/foobar@example.com you should get the
+ full link not the e-mail address. Or you can put a location
+ like 1600 Amphitheatre Parkway, Mountain View, CA 94043. To summarize:
+ https://www.google.com, or 650-253-0000, somebody@example.com,
+ or 9606 North MoPac Expressway, Suite 400, Austin, TX 78759.
- text2: This is some other
- text, with a link specified
+ text2: Explicit links using <a> markup.
+ This has markup for a link specified
via an <a> tag. Use a \"tel:\" URL
to dial a phone number.
diff --git a/samples/ApiDemos/src/com/example/android/apis/text/Link.java b/samples/ApiDemos/src/com/example/android/apis/text/Link.java
index b569d199b..cc3ed5b9a 100644
--- a/samples/ApiDemos/src/com/example/android/apis/text/Link.java
+++ b/samples/ApiDemos/src/com/example/android/apis/text/Link.java
@@ -59,7 +59,7 @@ public class Link extends Activity {
TextView t3 = (TextView) findViewById(R.id.text3);
t3.setText(
Html.fromHtml(
- "text3: Text with a " +
+ "text3: Constructed from HTML programmatically. Text with a " +
"link " +
"created in the Java source code using HTML."));
t3.setMovementMethod(LinkMovementMethod.getInstance());
@@ -70,11 +70,11 @@ public class Link extends Activity {
// hardcoded value.
SpannableString ss = new SpannableString(
- "text4: Click here to dial the phone.");
+ "text4: Manually created spans. Click here to dial the phone.");
- ss.setSpan(new StyleSpan(Typeface.BOLD), 0, 6,
+ ss.setSpan(new StyleSpan(Typeface.BOLD), 0, 30,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
- ss.setSpan(new URLSpan("tel:4155551212"), 13, 17,
+ ss.setSpan(new URLSpan("tel:4155551212"), 31+6, 31+10,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
TextView t4 = (TextView) findViewById(R.id.text4);