Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly event and weekly scrolling #11

Closed
emanueleDiVizio opened this issue Oct 16, 2014 · 6 comments
Closed

Weekly event and weekly scrolling #11

emanueleDiVizio opened this issue Oct 16, 2014 · 6 comments

Comments

@emanueleDiVizio
Copy link

I couldn't get to create weekly event, probably because an onWeekChangeListener is not implemented. My suggestion is to implement a method to scroll from week to week (From monday to monday), an onWeekChangeListener to populate the weekView and a method to start the week from a preferred day, other than today. Thanks a lot

@alamkanak
Copy link
Owner

A week change listener will not be a robust solution because when switching from a week to the next, the events from both the weeks should be visible (last day of the first week and first day of the next week). Also loading data for each week will result laggy animation. What you can do is you can implement onMonthChangeListener and set the number of visible days to 7.

If you are looking for a scrolling solution where it cannot be stopped in any day other than Monday, then I am sorry to say this feature has not been implemented yet. When this scrolling feature is available in the future, you will still have to implement onMonthChangeListener.

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented May 2, 2018

Any news about this feature? Was it added eventually?

If not, maybe this could be helpful for this feature:
https://stackoverflow.com/q/47514072/878126
?
EDIT: seems this library uses a single view that draws everything in a customized way. This won't help.

@CTKnight
Copy link

CTKnight commented May 6, 2018

This is a feature in my app, I use a work around:

  1. Modify the source of week view and disable horizontal swipping in the view(this part is not in my fork)

  2. Place a weekview per fragment set it to display 7 days events, use a fragment page adapter to achieve smooth horizontal swipping.

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented May 6, 2018

@CTKnight This won't work well, because swiping between them will also swipe the hours, and in addition, the hours might be different between pages.
I've found this fork which does it well , without ViewPager :
https://github.com/openium/Android-Week-View

But for some reason he didn't do a pull request. I've tested it and so far the only issue with it seems to be that he created a new class that extends WeekView instead of putting the new code in WeekView .

@CTKnight
Copy link

CTKnight commented May 6, 2018

@AndroidDeveloperLB you are right, extra efforts can be made to align hours if you use view pager (that's the part I leave for my teammates XD). My solution also creates a new class. This can't painless, for weekview doesn't leave much space to customize though.

@AndroidDeveloperLB
Copy link

@CTKnight I don't like the implementation here of WeekView, but it's just the only decent library I've found.
Here all that's drawn in a flat view that handles all and has 2000+ lines, making it hard to modify and understand.

Google Calendar app, for example, does use ViewPager and in fact multiple views in it. I've found it in the DDMS tool. I wanted to do it myself, but it just takes too much time, so I was instructed to use what I can find.

The library here has many issues that I've found:

jenishStudent pushed a commit to jenishStudent/Android-Week-View that referenced this issue Apr 26, 2019
* Transplanted invisible rect fix for whole day events from the Quivr fork over to Thellmund's fork

* Fixed rect not getting drawn for events that start and end at midnight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants