exodus-android-app
exodus-android-app copied to clipboard
Bug: too much scroll possible on trackers tab in app details
When the trackers aren't loaded yet, I can scroll the trackers tab very far until all the screen becomes black. This shouldn't happen I think...
Thanks for feedback, yes i know this bug, trackers tabs and permissions tabs have sames dimensions. If reports have lot of permissions tab trackers take sames dimensions then permissions tab.
Would there be a way to have 2 separate dimensions? :thinking: I don't know Kotlin at all, so I can't help on that one ^^
@Jean-BaptisteC I've looked at multiple solutions and all of them use a custom view that extends ViewPager and overrides the onMeasure() method.
Let me know if this solution sounds good or if you have any other suggestions.
I'm really not an expert in Android dev, but i think it's good idea. When do you want call onMeasure each time user switch between tabs or only one time when users open AppDetailFragment ?
onMeasure() is a method that is called to get the measurements of a view (a view is any UI element) in Android. The idea behind overriding the onMeasure() function is that we are providing our own measurement to Android.
In this case, we will provide the height of the child element (tracker fragment/permission fragment) so that the ViewPager's height will be the height of the current tab.
More about onMeasure on stackoverflow
Thanks for more explanation, yes i think it's a good solution
@Jean-BaptisteC Unfortunately, in the Exodus app ViewPager2 is used which is a final class that cannot be extended.
Therefore the solution mentioned above isn't possible.
I've tried multiple solutions for ViewPager2:
- stackoverflow.com/a/64235840
- stackoverflow.com/a/58632613/17240756
- stackoverflow.com/a/68691439/17240756
but none of them worked perfectly.
Resources:
- developer.android.com/guide/topics/ui/how-android-draws
- issuetracker.google.com/u/0/issues/143095219
I hope someone can make use of the linked resources and fix this bug in the future.
Thanks for research, it's not a problem if this bug is not solved now 🙂