Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何删除指定元素, 比如我想在图片上面添加一个删除按钮, 如何可以点击删除 #15

Open
manitozhang opened this issue Apr 7, 2024 · 1 comment

Comments

@manitozhang
Copy link

No description provided.

@manitozhang
Copy link
Author

调用了mRichUtils.removeBlockImageSpan(blockImageSpan);,报错
java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0 at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1331) at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:685) at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:677) at android.text.Selection.setSelection(Selection.java:95) at android.text.Selection.setSelection(Selection.java:79) at android.text.Selection.setSelection(Selection.java:154) at android.widget.Editor.onTouchUpEvent(Editor.java:2723) at android.widget.TextView.onTouchEvent(TextView.java:12847) at android.view.View.dispatchTouchEvent(View.java:15886) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3214) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2851) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3214) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2851) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3214) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2851) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3214) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2851) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3214) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2851) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3214) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2851) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3214) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2851) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3214) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2851) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:577) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1908) at android.app.Activity.dispatchTouchEvent(Activity.java:4579) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at com.android.tools.profiler.support.event.WindowProfilerCallback.dispatchTouchEvent(WindowProfilerCallback.java:69) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:535) at android.view.View.dispatchPointerEvent(View.java:16169) at com.xiaomi.mirror.MiuiMirrorImpl.isHandled(MiuiMirrorImpl.java:152) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:8036) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7797) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7165) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7222) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7188) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7353) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7196) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7410) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7169) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7222) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7188) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7196) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7169) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:10420) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:10371) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:10326) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:10586) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:306)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant