How to allow the user to select a text range in a TextView (Similar to EditText)

后端 未结 5 714
闹比i
闹比i 2020-12-08 05:27

I\'ve got a TextView that I would like to allow the user to select a range of text from within it. The TextView takes up the entire width and heigh

5条回答
  •  失恋的感觉
    2020-12-08 06:05

    You could display the text in a WebView and enable text selection. If you want to only use a textview/edittext, here is an answer that might help you and here is information on the Spannable class that might help you accomplish what you want.

提交回复
热议问题