-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add custom action for long press on existing event #42
base: master
Are you sure you want to change the base?
Conversation
Add check for long press type
Refactor and comments
Hi, Chris. Thanks for helping me to improve this project. I love your idea of this custom long press type. I checked your code, this custom type long press is based on pressing on an existed cell
I think the difficulty for users is to get the date info when long pressing the view, but in fact they can use the function Your custom gesture is more like a tapGesture. What do you think? Do you think any idea? |
I don't see why not, it would just change the move functionality... I will refactor this and see what happens :). Btw with this PR, |
Okay, thanks. |
Hi I made some improvements for the longPressView in branch improvement-longPressHold. This one is mainly improved the longPressGesture "Hold" status. For current longPress, if the user holds the longPress and without changing the longPress location, the longPress listener will not be called. As a result, when you try to move the event vertically or horizontally then reach the edge and hold, it won't scroll to correspond offset. However, if you keep moving (change longPress state changed), then the view will start scrolling. In order to resolve this problem, I add a timer to call the updateScroll and timeLabel every 0.2s. Also, I removed the update code in change state. If you have time, could you try it first and give me some feedbacks before I push it to master because you are doing some related stuff recently. Thanks |
This PR adds a delegate method if the user long presses on a current event. I use this to let the user perform actions other than move the event. For example, I present an action menu on an event.
I did this quite quickly so open to your review and comments!
Example of how we use it: