Show context menu when link is long pressed in TextView
Posted
by Al
on Stack Overflow
See other posts from Stack Overflow
or by Al
Published on 2010-04-18T16:35:24Z
Indexed on
2010/04/19
22:43 UTC
Read the original article
Hit count: 276
I have a TextView
with its MovementMethod
set to LinkMovementMethod
. Text added to the TextView
is a combination of normal text and URLs. For URLs, I would like to offer a context menu when the URL is long pressed for doing things such as copying the address. I've had a look at the source for LinkMovementMethod
but it doesn't seem to have any long pressed related code I could override. Any ideas on how to go around achieving this?
© Stack Overflow or respective owner