Quivr / Android-Week-View

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Apache License 2.0
257 stars 64 forks source link

Horizontal/Vertical Scrolling Speed #67

Open ghost opened 6 years ago

ghost commented 6 years ago

I noticed that scrolling is slow. Even after changing the value app:xScrollingSpeed="1.0", 2.0. No difference. That is, when I slowly scroll, scrolling lags behind, When I fast scroll it works well. It is about vertical scrolling.

Anв I have a question about horizontal scrolling. When I swipe slow it isn't display next day, and if I swipe fast then a few days in advance leaves. That is if today is 7th january and if I swipe fast then it dispaled 10th january.

Will this be quickly fixed?

jhoobergs commented 6 years ago

Can you test the horizontal scrolling with: weekView.setXScrollingSpeed(-1 * (Math.log(2.5) / Math.log(1.0 / (1 + nbVisibleDays))).toFloat()); ? This seems to work quite well in our app.

The horizontal scolling depends on the speed of your horizontal swipe, the faster you swipe, the more days he goes further. If you swipe to slow, he indeed doesn't scroll, by design.

What's your exact problem with the vertical scrolling ?

ghost commented 6 years ago

About vertical scrolling, it is very slow scrolled with a delay.

The horizontal scolling depends on the speed of your horizontal swipe, the faster you swipe, the more days he goes further.

then how can I change it to despite the speed at swipe showed the next day?

jhoobergs commented 6 years ago

Changes would have to be made at https://github.com/Quivr/Android-Week-View/blob/develop/library/src/main/java/com/alamkanak/weekview/WeekView.java#L231

It would be best to check: https://github.com/Quivr/Android-Week-View/issues/31

I haven't experienced the slow vertical scrolling myself yet, but your free to see which code can be improved.

I know that the scrolling isn't implemented perfectly 😄

ghost commented 6 years ago

Thanks for the help. I'll check