[BUG]: Zooming in Statistics Page
Checked for duplicates?
- [X] This issue is not a duplicate
Does it also happen in the desktop version?
- [ ] This bug does not occur in the latest version of Anki
What are the steps to reproduce this bug?
- Open Statistics
- Zoom in then Zoom Out
- Scroll to the bottom
Expected behaviour
everything's normal
Actual behaviour
page scrolls infinitely. After the Cards Added section it's an infinite empty screen you can scroll through.
Debug info
AnkiDroid Version = 2.18alpha8 (6fc26947fd31743bc83e68f17ae7fec64bfa8e62)
Backend Version = provider(?) (24.04 429bc9e14cefb597646a0e1beac6ef140f226b6f)
Android Version = 11 (SDK 30)
ProductFlavor = full
Manufacturer = realme
Model = RMX2193
Hardware = mt6768
Webview User Agent = null
ACRA UUID = cf265e01-9693-407f-984d-61ddf9698fac
FSRS Enabled = true
Crash Reports Enabled = true
(Optional) Anything else you want to share?
No response
Research
- [X] I am reporting a bug specific to AnkiDroid (Android app)
- [X] I have checked the manual and the FAQ and could not find a solution to my issue
- [X] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
Reproduced! after zooming in and zooming out the statistics page goes into infinite scroll and goes into empty white spaces.
I am working on it.
@brishtibheja Can you confirm if this is the issue you mentioned?
https://github.com/ankidroid/Anki-Android/assets/69842037/82e376d1-06b7-43e6-969e-ca87c6c865f5
Don't worry. You've got the right one.
@brishtibheja thanks for confirming. I am working on it.
Zoom in the stats page is quite buggy. For example, after zooming in, it is sometimes not possible to zoom out. Sometimes, zooming in itself requires multiple tries.
Out of the many Anki pages included in AnkiDroid, this issue occurs only in the Stats page and started in alpha 8. This makes me think that https://github.com/ankidroid/Anki-Android/pull/16027 might have a role. I may be wrong but I think that it's worth checking whether this PR is the cause.
the problem is with the nestedScrollView. Instead we can use LinearLayout.
I Tested it with Linear Layout.
https://github.com/ankidroid/Anki-Android/assets/69842037/708224c1-1528-4184-a589-b1e8c5179d75
@user1823 Yes! This bug appeared after the nestedscrollview added to hide the topbar when scrolled.
the problem is with the nestedScrollView. Instead we can use LinearLayout. I Tested it with Linear Layout.
Based on the video, it seems to break the feature added in the above-mentioned PR, i.e., hiding the top bar on scroll.
Ideally, we would want to fix the current issue without breaking the feature.
@user1823 It is just to confirm the reason of bug. We can find alternate solution that works with this feature also. My bad
@jainishrpandya Thanks for breaking the cause of the bug. Seems I forgot to test throughly while I implemented hide scroll feature which led 2 more issues.
Can you check, does this help in fixing it?
https://stackoverflow.com/questions/35127845/webview-inside-nestedscrollview-cannot-be-scrolled
@neeldoshii i will try and update you ASAP.
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:fillViewport="false"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
Did this helped anyway? My spare android device is pretty old which's multiple taps ain't working properly.
I'm sorry for not getting back to you sooner. I have tested different approaches, but the problem persists. so I think the problem is with the page from where the data is sourced. maybe I am wrong so can someone double check.
I believe that this is a problem with the interaction of View zooming and the appbar properties. This may not be solvable without doing hacks or without a deep understanding of the views that are being used.
I'm removing the Priority-High label since this isn't a major distress for the user
Hi @jainishrpandya, are you still working on this? If not, I would like to.
@deysak feel free to work on it if you don't get a reply within 24 hours from your comment
Ping me at this point if you want it assigned (only as a formality, not required to work on the issue)