Android Tutorial

(avery) #1
Android Tutorial 171

web pages, which, in our opinion, are the most reliable and
predictable:

<TextView
android:id=”@+id/TextView02”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:text=”@string/autolink_test”
android:autoLink=”web|email” />


There are two helper values for this attribute, as well. You can set
it to none to make sure no type of data is linked. You can also set it
to all to have all known types linked. Figure illustrates what
happens when you click on these links. The default for a TextView
is not to link any types. If you want the user to see the various
data types highlighted but you don’t want the user to click on
them, you can set the linksClickable attribute to false.

Retrieving Data from Users

The Android SDK provides a number of controls for retrieving data
from users. One of the most common types of data that
applications often need to collect from users is text. Two frequently
used controls to handle this type of job are EditText controls and
Spinner controls.
Free download pdf