Android默认textselector复制文本不起作用
作者:互联网
java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0
at android.text.SpannableStringInternal.checkRange(SpannableStringInternal.java:355)
at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:77)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at android.text.Selection.setSelection(Selection.java:76)
at android.widget.Editor$SelectionEndHandleView.updateSelection(Editor.java:3485)
at android.widget.Editor$HandleView.positionAtCursorOffset(Editor.java:3173)
at android.widget.Editor$HandleView.positionAtCursorOffset(Editor.java:3157)
at android.widget.Editor$SelectionEndHandleView.updatePosition(Editor.java:3500)
at android.widget.Editor$HandleView.onTouchEvent(Editor.java:3266)
at android.view.View.dispatchTouchEvent(View.java:7736)
at android.view.View.dispatchPointerEvent(View.java:7916)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4023)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3902)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3452)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3502)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3471)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3578)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3479)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3635)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3452)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3502)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3471)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3479)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3452)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5657)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5588)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5559)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5737)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:5710)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:5756)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:542)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
&PRODUCT=ghost_retasia&DISPLAY=0.currentSizeRange.smallest=[720,670]
当我点击android中的文本视图来复制选定的text.two选择器手柄在同一位置指向时,当我尝试移动它们时,我得到这个错误,我得到这个错误.
也有时我的
textisselectable=true
这个功能在少数设备上不起作用?我谷歌,但我没有找到任何相关的工作解决方案.
我有自定义列表视图我想复制自定义行的内容.
解决方法:
这是由于Html.fromttext或链接.见https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=137509
标签:android,android-listview,textview,android-custom-view,custom-view 来源: https://codeday.me/bug/20190623/1275404.html