TextViewSpanClickable icon indicating copy to clipboard operation
TextViewSpanClickable copied to clipboard

回复者1的长按事件长按会崩溃

Open merhong2012 opened this issue 10 years ago • 2 comments

错误: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.widget.Editor$SelectionModifierCursorController.getMinTouchOffset()' on a null object reference

merhong2012 avatar Oct 11 '15 05:10 merhong2012

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

设置一个长按监听器即可。

pahoehoe avatar Jan 02 '16 04:01 pahoehoe

这个链接http://stackoverflow.com/questions/30048976/nullpointerexception-when-long-press-on-textview-with-spannablestring

pahoehoe avatar Jan 02 '16 04:01 pahoehoe