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

it gives NullPointerException when clicked a link for fragment transaction in a recycler view #49

Open
yummyummyummy opened this issue Dec 14, 2017 · 3 comments

Comments

@yummyummyummy
Copy link

yummyummyummy commented Dec 14, 2017

12-14 12:12:30.516 784-784/ E/InputEventReceiver: Exception dispatching input event. 12-14 12:12:30.516 784-784/ E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback 12-14 12:12:30.522 784-784/ E/MessageQueue-JNI: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.klinker.android.link_builder.TouchableBaseSpan.setTouched(boolean)' on a null object reference at com.klinker.android.link_builder.TouchableMovementMethod.onTouchEvent(TouchableMovementMethod.java:85) at android.widget.TextView.onTouchEvent(TextView.java:10059) at android.view.View.dispatchTouchEvent(View.java:10723) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:559) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1870) at android.app.Activity.dispatchTouchEvent(Activity.java:3236) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:521) at android.view.View.dispatchPointerEvent(View.java:10952) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5121) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4973) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4504) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4557) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4523) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4656) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4531) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4713) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4504) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4557) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4523) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4531) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4504) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7011) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6940) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6901) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7121) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.Me

@klinker24
Copy link
Owner

Can you provide a sample to replicate this behavior?

@yummyummyummy
Copy link
Author

yummyummyummy commented Dec 14, 2017

Hi
I am using this library to manage fragments - https://blog.f22labs.com/instagram-like-bottom-tab-fragment-transaction-android-389976fb8759

when I call mFragmentNavigation.pushFragment( ... params) through this kind of code below
link = Link(..a String...)
.setUnderlined(false)
.setBold(true)
.setOnClickListener({
mFragmentNavigation.pushFragment( ... params)
})

it gives me error like I attached

thank you.


I think the above codes are not enough , so will add a little bit more

I created link with below codes

LinkBuilder.on(message - a textview)
.addLinks(..a list which contains the 'link'..)
.build()

and it appears on screen , but when I click the created link, it gives me error

@klinker24
Copy link
Owner

If you can out together a sample recreating this behavior, I can take a look. This is not enough to go on yet, unfortunately.

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

2 participants