0

I am trying to select a word which has background span by double clicking but the word is not selected.

But if I do programmatically using setSelection(start,end) selection works. Double click and Long press not working for selection

I used LinkMovementMethod in my editText.

Thanks

Vijay
  • 545
  • 1
  • 5
  • 15

1 Answers1

0

Have You tried with attribute textIsSelectable?

<TextView
    android:id="@+id/deviceIdTV"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textIsSelectable="true"
    android:text="" />

From https://stackoverflow.com/a/8969000/619673

However I used to use LinkMovementMethod to make text clickable on i.e url or to scroll textView.

Community
  • 1
  • 1
deadfish
  • 11,996
  • 12
  • 87
  • 136