thellmund / Android-Week-View

Display highly customizable calendar views in your Android app
Apache License 2.0
188 stars 98 forks source link

Adding On Scroll listener when first visible date changed #225

Closed Mohamadkotb closed 3 years ago

Mohamadkotb commented 3 years ago

I need to add a scrolling listener, so when the first visible date changed the callback triggered.

How can I clear the current events and add other events without trigger onLoadMore

thellmund commented 3 years ago

Please take a look at the wiki, which answers both of these questions.

MohamedHarmoush commented 3 years ago

I checked it before I created the issue and checked it after you told me, but I couldn't find a setter method in WeekView to scroll listener when to be triggered after the user selects a date.

for more details

I want the calendar to show only one-day and fetch the events of the selected date and when the user scrolls calendar I want to fetch its events, so I set the visible days to be 1 and currently I want a scroll listener to be triggered when the user scrolled to next day or previous day. I hope you're got my point.

And Thanks a lot for your great work.

MohamedHarmoush commented 3 years ago

@thellmund Thanks I figure out that I was wrong. the callback fun onRangeChanged(firstVisibleDate: Calendar, lastVisibleDate: Calendar) is triggered after firstVisibleDate is changed. Sorry for disturbing you and thanks for your help