-
Notifications
You must be signed in to change notification settings - Fork 64
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
Scroll by week instead of day #31
Comments
@florianhenonin Maybe we can make it more general to allow people to set the amount of days to scroll at once. I think for instance it can be great to scroll by the same amount of days as the amount of visible days. Would you like to work on it ? |
This would be awesome ! I would love work on it but unfortunately can't for now... |
Just a quick idea, maybe the view should only have a day-view and multiple-days view where it is just a tableview (~Google Agenda). Then a viewpager can be used to show multiple of these views. I think this would benefit the simplicity of the view (only show 1 day) and scrolling (would also be automatically by the number of selected days). This is however a big refactor. |
I'm currently using ViewPager to do that but it's not enough efficient. |
Letting the library create multiple days itself, is much more efficient. It's not really a big change to change the amount of scrolled days in the current code. |
That's true. Maybe the horizontal scrolling can also be adjusted to resemble more the behavior of Google Calendar (at least when scrolling by week), i.e. snap to the next week and don't scroll multiple weeks at once? |
You can use the xScrollingSpeed attribute to adapt the horizontal behaviour. In some circumstances it's nice to scroll multiple weeks at once. |
True, but setting it too low causes the view not to scroll sometimes when it would be desired while still scrolling multiple days when scrolling fast. Also, scrolling slowly does not always trigger the scrolling immediately for me which can cause the view snapping to the same day again. For my usecase it was needed to scroll one day at a time so I disabled scrolling of the view and implemented a non-interactive scroller on top of it that consumes any horizontal swipe and sets the date of the view to the next/previous. This is why I was thinking about a scrolling behavior that lets the view always snap to its next/previous period, but I understand it might not be something a lot of people need. Anyway thanks for all the great work of this awesome view :) looking forward to its new features |
It would be nice if someone adds the feature to automatically scroll by the amount of days that is currently being shown 😉 |
Ok, so I have done a weekview that scroll 7 days by 7 days. It's working exactly like it is needed. To explain : Actually it only allows scrolling week by week (or 7 days by 7 days, I want to say that it could be another day than Monday in first day of the 7days). I will write it more genericly. Edit: If you really need this feature and can't wait for PR, you can find fork here : https://github.com/openium/Android-Week-View |
@SkyleKayma will you please share the code how you done the functionality Swipe week by week . or 7 days by 7 days |
I will. Not really the time to do it actually, so I linked the forked project for the moment. But keep connected, it will be done in some days. (See edited message before) Edit: I have edited message before, I have pushed the lasted version I have actually just now. |
ok Thanks let me check your forked project |
@SkyleKayma I tried with your code to achieve the week by week view functionality but its not working ,did you get a chance to working on this project ? |
Yeah I get a chance today to work on it again, and I have a working WeekView with some new features:
And some other usefull functions that I needed in my own project so I had them, like get the Height of the weekView WITHOUT the header size. The code is by far more clean than before, so I will do PR this WE probably. After that I will need to talk to @jhoobergs to know if it's ok to have a new WeekView (Here called WeekViewAdvanced) that inherit the first one or if we can combine the two in the first one. I pushed the new modification on the github project link before. |
@SkyleKayma Nice. |
@SkyleKayma Can you please do a pull request? |
Allready done. Never ended. |
@SkyleKayma You did? Where? And how come yours don't have this issue: |
Which functions? Also, I think what I wrote was of a different repository, so it means I didn't test yours. |
My PR just allow the scroll week by week. That's all. |
I've tested his code. Seems to work, but it has an issue: |
I've prepared a pull request that contains those changes, together with some fixes of issues I've found, and conversion to 100% Kotlin code : |
As Google Agenda, should it be possible to scroll by week instead of day ?
Thank you for your work.
The text was updated successfully, but these errors were encountered: