cymcsg/UltimateRecyclerView

Recyclerview in a PageView

Open

#395 geöffnet am 6. Juli 2016

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (1.446 Forks)batch import
help wanted

Repository-Metriken

Stars
 (7.224 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I am having a problem implementing multiple recyclerviews inside a pageview. I have multiple fragments representing each page in a pageview. Each fragment implements its own unique ultimate recyclerview.

Here is the error: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.ClipData.getItemCount()' on a null object reference at android.widget.Editor.onDrop(Editor.java:2153) at android.widget.TextView.onDragEvent(TextView.java:9566) at android.view.View.dispatchDragEvent(View.java:19700) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewGroup.dispatchDragEvent(ViewGroup.java:1518) at android.view.ViewRootImpl.handleDragEvent(ViewRootImpl.java:5282) at android.view.ViewRootImpl.-wrap6(ViewRootImpl.java) at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3457) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

An internet search indicates the error may be caused by failure to wrap the recyclerview inside a LinearLayout. But I have done that in the xml layout file as well as in code: ultimateRecyclerView.setLayoutManager(new LinearLayoutManager(ultimateRecyclerView.getContext()));

The error occurs when drag and drop is performed on device. The error is random. Cannot detect a drag/drop pattern to make error occur.

Please help.

Contributor Guide