TextViewSpanClickable
TextViewSpanClickable copied to clipboard
回复者1的长按事件长按会崩溃
错误: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.widget.Editor$SelectionModifierCursorController.getMinTouchOffset()' on a null object reference
textView1.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { return true; } });
设置一个长按监听器即可。
这个链接http://stackoverflow.com/questions/30048976/nullpointerexception-when-long-press-on-textview-with-spannablestring