Open mvgreen opened 4 years ago
Sorry for the late replay and thank you for the suggestion.
Can I ask about No2 a bit more to make it clear?
it will scroll really slow, because it has a larger surface and it takes more time to reach target point.
I feel, regardless of the orientation, the distance between the current-selected position and the next target point is the same.
Let's say, msrv_speed_ms_per_inch=50
and snap_count=2
and the selected item is on index 4.
If you scroll to right, it will snap to index 6.
Since the distance between the item on index 4 and index 6 is the same on any orientation (as long as the size of each item is the same.), it will take the same amount of time. (I'm trying to reproduce it on demo app, but could not reproduce it.)
Or when you are talking about the bigger device, it has bigger items than a smaller device?
Yes, in my case items had "match_parent" width and so they were bigger when I change orientation to landscape, for example.
I see. I understand your use case.
I will try and see if I can handle that use case and get back to you.
Hello and thank you for your library, it helped me a lot! However, I found an issue in your implementation. In fact there are two issues in one:
I'll explain the second issue as it is more important. If you swipe your recyclerview on a small screen in portrait mode with (for example) msrv_speed_ms_per_inch=50, it will change the page pretty fast. But if you'll try it on a bigger device (on a tablet), it will scroll really slow, because it has a larger surface and it takes more time to reach target point.
Instead, it would be better to declare a constant time for snap helper, that will be equally fast on both devices.