Comments (24)
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.
from android-week-view.
@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 ?
from android-week-view.
This would be awesome !
I would love work on it but unfortunately can't for now...
Maybe in a few month.
from android-week-view.
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.
from android-week-view.
I'm currently using ViewPager to do that but it's not enough efficient.
On iOS I'm using Calendar which is very fast.
from android-week-view.
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?
from android-week-view.
You can use the xScrollingSpeed attribute to adapt the horizontal behaviour. In some circumstances it's nice to scroll multiple weeks at once.
from android-week-view.
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
from android-week-view.
It would be nice if someone adds the feature to automatically scroll by the amount of days that is currently being shown π
from android-week-view.
Ok, so I have done a weekview that scroll 7 days by 7 days. It's working exactly like it is needed.
I will do a PR when the code I have will be better organized.
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
DON'T FORGET that this still a beta feature and there is probably bugs that I didn't saw for the moment.
The tips to make it work is : Use the temp WeekViewAdvanced, and then call goToDate() to make it start the day you want (a Monday to scroll Monday by Monday, ...)
from 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
from android-week-view.
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.
from android-week-view.
ok Thanks let me check your forked project
from android-week-view.
@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 ?
from android-week-view.
Yeah I get a chance today to work on it again, and I have a working WeekView with some new features:
- You can scroll by the amount of days you want, includes :
- fling only scroll to next "amount of days" you wanted
- There was a problem that when you wanted to scale, the view scrolled on X axis too. There was no option that prevent to scroll X axis when you are scaling.
- A "prevent fail scrolling" feature, it's a little distance that you can scroll "safely".
Ex: Let's say that the view only scrolls at 50pixels when it is 800pixels wide, so let's say that the "SafeZone" is 100pixels, so we will not move to the next week because the scroll was not "significant" enough. It's atleast a good feature that is actually activated by default, But I will make it configurable.
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.
Ex: I needed to show by default 8h to 20h, but the lib only allow to define the first one.
So I called my new function, and divide the size I get by the number of hour to show (here 12 -> 20-8) to get the "hourHeight" to define.
And THEN call goToHour to set it to 8h. =]
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.
from android-week-view.
@SkyleKayma Nice.
It would be best if it can be combined into 1 class.
from android-week-view.
@SkyleKayma Can you please do a pull request?
from android-week-view.
Allready done. Never ended.
from android-week-view.
@SkyleKayma You did? Where? And how come yours don't have this issue:
#94
?
from android-week-view.
I started it here :
#68
But at this moment, I was just starting Android dev. I could do a lot better today..
Someone tried to take my work again to do something with :
#88
In fact there is some functions that I had here, and never put in my PR. So if you have the time to do this, you can.
from android-week-view.
Which functions? Also, I think what I wrote was of a different repository, so it means I didn't test yours.
from android-week-view.
My PR just allow the scroll week by week. That's all.
Here, I had the "safe scroll" (You started to scroll but it was not enough so it came back to the actual selected week, just like any calendar app), and a fix to prevent the "zooming" action to scroll on X axis.
from android-week-view.
I've tested his code. Seems to work, but it has an issue:
If you scroll while it is snapping, it won't snap well.
See attached video:
device-2018-05-07-120729.zip
from android-week-view.
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 :
#97 (comment)
from android-week-view.
Related Issues (20)
- Bug with goToHour method when time range is set HOT 3
- Serious bug in viewing events : not showing all events that are given HOT 1
- Bug: adding full day WeekViewEvent with same startDate and endDate results in single cell HOT 1
- Event not drawing on 31st day of month HOT 2
- Events Not loading after asynchronous call
- On Load scroll to current time, not 12am HOT 1
- disable fling doesn't seem to work correctly HOT 1
- Crash issue
- Enchanced : customize the date format
- Preview Render Problems HOT 1
- Add Event Dynamically HOT 3
- Crashes on API 28
- doesnt shows anything any help HOT 1
- Needs to Click the gototoday before showing all the events
- How to implement a multi-line String on header date
- Drag and Drop feature on marked Events HOT 3
- ε¨ζζ·»ε event δΈη΄θΏε
- Event title vertical alignment
- Multiple events on same day not showing
- is it possible to turn off zoom?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-week-view.