user1206401 user1206401 - 2 months ago 11
Android Question

Android: How to make Linkify links not long-clickable

I have some TextViews that I use Linkify on. I'd like for the links to not be long-clickable. Using setLongClickable(false) on the TextViews doesn't have any affect on the Linkify links. Is there any way to make these links not long-clickable?

Answer

Turns out, the solution was quite simple:

textview.setOnLongClickListener(new OnLongClickListener(){
    public boolean onLongClick(View v) {
        return true;
    }
});