android:longClickable - Select Text While User Pressing TextView

How to Select Text While User Pressing TextView

android:longClickable was added in API Level 1

Defines whether the TextView reacts to long click events.

1. Add a TextView in your main.xml file.

2. In the main.xml file, add the code below.

  <TextView
        ...
       android:longClickable = "true"
  />

3. Compile and run!

Related Articles:
Resources:
http://developer.android.com/reference/android/view/View.html#attr_android:longClickable
http://developer.android.com/reference/android/R.attr.html#longClickable