Giter Site home page Giter Site logo

Comments (24)

jhoobergs avatar jhoobergs commented on July 29, 2024 1

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.

jhoobergs avatar jhoobergs commented on July 29, 2024

@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.

florianhenonin avatar florianhenonin commented on July 29, 2024

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.

wietsebuseyne avatar wietsebuseyne commented on July 29, 2024

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.

florianhenonin avatar florianhenonin commented on July 29, 2024

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.

wietsebuseyne avatar wietsebuseyne commented on July 29, 2024

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.

jhoobergs avatar jhoobergs commented on July 29, 2024

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.

wietsebuseyne avatar wietsebuseyne commented on July 29, 2024

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.

jhoobergs avatar jhoobergs commented on July 29, 2024

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.

SkyleKayma avatar SkyleKayma commented on July 29, 2024

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.

nivritgupta avatar nivritgupta commented on July 29, 2024

@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.

SkyleKayma avatar SkyleKayma commented on July 29, 2024

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.

nivritgupta avatar nivritgupta commented on July 29, 2024

ok Thanks let me check your forked project

from android-week-view.

nivritgupta avatar nivritgupta commented on July 29, 2024

@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.

SkyleKayma avatar SkyleKayma commented on July 29, 2024

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.

TestVideo.zip

from android-week-view.

jhoobergs avatar jhoobergs commented on July 29, 2024

@SkyleKayma Nice.
It would be best if it can be combined into 1 class.

from android-week-view.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on July 29, 2024

@SkyleKayma Can you please do a pull request?

from android-week-view.

SkyleKayma avatar SkyleKayma commented on July 29, 2024

Allready done. Never ended.

from android-week-view.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on July 29, 2024

@SkyleKayma You did? Where? And how come yours don't have this issue:
#94
?

from android-week-view.

SkyleKayma avatar SkyleKayma commented on July 29, 2024

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.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on July 29, 2024

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.

SkyleKayma avatar SkyleKayma commented on July 29, 2024

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.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on July 29, 2024

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.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on July 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.