Open handhand opened 2 months ago
Thank you for creating your first issue. We appreciate your help in making this project better. We will look into it, and get back to you soon. Need help or want to discuss this issue? Join our Discord community here to ask questions and discuss this issue live!
📝 Describe the Bug
We uses pdfView.recyclerView.canScrollVertically(1) to detect whether the pdf is scrolled to the very bottom(not the last page), to ensure user has read the whole content. But since 2.1.0, PinchZoomRecyclerView.canScrollVertically(1) always return false
📖 Library Version
🚶 Steps to Reproduce
Please follow these steps to reproduce the issue:
Initial Setup/Library Method Used: [e.g.,
initWithUrl
method] In PdfViewerActivity, add the below snippet: binding.pdfView.recyclerView.addOnScrollListener(object: RecyclerView.OnScrollListener() { override fun onScrolled(recyclerView: RecyclerView, dx:Int, dy:Int) { super.onScrolled(recyclerView(recyclerView, dx, dy) Log.d("pdfViewer", binding.pdfView.recyclerView.canScrollVertically(1).toString()) } } ) Run and scroll the pdf, and observe the log.Actions Taken: [e.g., Clicked on 'Load PDF']
Unexpected Behavior: [e.g., PDF not loading]
Relevant Code/Stack Trace: [Include code snippet or stack trace if applicable] We found that in PinchZoomRecyclerView, if scale is 1, then mPoxY is always 0, then the override computeVerticalScrollOffset() always return 0, which breaks canScrollVertically() eventually.
🤔 Expected Behavior
What did you expect to happen? canScrollVertically() returns false only when the pdf reaches the bottom
🖼️ Screenshots/Videos
If applicable, add screenshots or videos to help explain your problem.
📱 Smartphone Info:
💻 Code Snippets
Include relevant code snippets or links to code repositories.
📜 Log Output/Stack Trace
Include any error logs or stack trace for more context.
💬 Additional Context
Add any other context about the problem here. Mention if the issue is consistent, specific scenarios where the bug occurs, etc.