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

java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 #18

Open
ugurcany opened this issue Sep 27, 2016 · 0 comments
Open

java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 #18

ugurcany opened this issue Sep 27, 2016 · 0 comments

Comments

@ugurcany
Copy link

ugurcany commented Sep 27, 2016

When the RecyclerView is empty and I click somewhere on empty screen, I'm getting the following exception inside onRowClicked(int position) since callback calls this method although it should not:

09-27 15:16:37.669 24445-24445/cc.chatstop.android E/InputEventReceiver: Exception dispatching input event.
09-27 15:16:37.669 24445-24445/cc.chatstop.android E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
09-27 15:16:37.673 24445-24445/cc.chatstop.android E/MessageQueue-JNI: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
                                                                           at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
                                                                           at java.util.ArrayList.get(ArrayList.java:308)

BTW, I'm using setStackFromEnd(true) for my RecyclerView. Probably, that causes a mistaken callback for an empty list. Please check it.

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