There is a TextView in which there are several links. When you click on the TextView PopupMenu appears. But at the same time there is a transition to the site. It is impossible to remove the "autoLink" attribute - PopupMenu will not appear. Question: How to make links in TextView not clicked? I know that I need to use LinkMovementMethod() , but I don’t know how.

I try something like:

 @Override public boolean onTouchEvent(TextView widget , Spannable buffer , MotionEvent event ){ return false; } 

    1 answer 1

    There is a solution to do this through the TextView markup:

     <TextView ... android:linksClickable="false" .../>