Open sssvrock opened 7 years ago
Hi @barteksc Any update on recyclerview rendering.
because after this successful implementation I can move further. Let me know if you need more clarity on what I am doing.
Regards Vinod
Here is Log cat:
When I am scrolling from top to bottom and bottom to top using recyclerview:
E/com.shockwave.pdfium.PdfiumCore: mContext may be null 02-14 12:59:13.952 28809-29025/com.self.pdf_poc W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference 02-14 12:59:13.952 28809-29025/com.self.pdf_poc W/System.err: at com.shockwave.pdfium.PdfiumCore.renderPageBitmap(PdfiumCore.java:229) 02-14 12:59:13.952 28809-29025/com.self.pdf_poc W/System.err: at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:91) 02-14 12:59:13.952 28809-29025/com.self.pdf_poc W/System.err: at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:70) 02-14 12:59:13.952 28809-29025/com.self.pdf_poc W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 02-14 12:59:13.952 28809-29025/com.self.pdf_poc W/System.err: at android.os.Looper.loop(Looper.java:148) 02-14 12:59:13.952 28809-29025/com.self.pdf_poc W/System.err: at android.os.HandlerThread.run(HandlerThread.java:61) 02-14 12:59:14.983 28809-29025/com.self.pdf_poc E/com.shockwave.pdfium.PdfiumCore: mContext may be null 02-14 12:59:14.983 28809-29025/com.self.pdf_poc W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference 02-14 12:59:14.983 28809-29025/com.self.pdf_poc W/System.err: at com.shockwave.pdfium.PdfiumCore.renderPageBitmap(PdfiumCore.java:229) 02-14 12:59:14.983 28809-29025/com.self.pdf_poc W/System.err: at com.github.barteksc.pdfviewer.RenderingHandler.proceed(RenderingHandler.java:91) 02-14 12:59:14.983 28809-29025/com.self.pdf_poc W/System.err: at com.github.barteksc.pdfviewer.RenderingHandler.handleMessage(RenderingHandler.java:70) 02-14 12:59:14.983 28809-29025/com.self.pdf_poc W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 02-14 12:59:14.983 28809-29025/com.self.pdf_poc W/System.err: at android.os.Looper.loop(Looper.java:148) 02-14 12:59:14.983 28809-29025/com.self.pdf_poc W/System.err: at android.os.HandlerThread.run(HandlerThread.java:61)
Hi @barteksc ,
In general PDF contains more papers, in my case I am rendering single page with
I am displaying Each PDF file in Recyclerview using Adapter, so I can do load more for each pdf file it makes user comfort of rendering of pdf files.
While I m scrolling down the property of recyclerview is reusing the the views so at that time Pdfium core is distroyed and it is not at all rendering in scrolldown.
Here is logcat:
How can I achieve my solution. Please let me know it's urgent
Thanks