-
Notifications
You must be signed in to change notification settings - Fork 164
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
Keep slided to unlock #107
Comments
Hi @sebasira Thanks for submitting this feature request. Unfortunately I haven't fully understood your request. Can you provide a real-world scenario or use case? Generally, I don't think that having a timing attribute is a good idea. Ideally you should be able to achieve what you need only using event handlers. |
I agree with you when you say
But I was thinking that maybe this behaviour could be encapsulated in this library. The real-world scenario would be to prevent unwanted slides. I know it's difficult to accidentaly slide a button from one side to another, but in the app I'm developing the Users say they accidentaly do it most of the time. You could think of the requirement as a long-pressed button or the onLongClick event. As a safe-lock for the action. If the User really wants to perform the actions he would have to slide it, keep it in the slided position and then release. If he just slide it, it would bump as locked. And about
Maybe if you give me some clues I can achieve it. I was thinking on locking the button and release the lock if it remains a certain amount of time on the slided position, but I don't know how I would know how much time it was. That's what I can figure out |
Hi @sebasira As a side note, you can probably achieve this behavior as you suggested:
You should also take care that you invalidate the timer if the user is moving back the slider with the finger (e.g. the user should stay in the area 80% - 100% of the slider for more than X seconds). I hope I was helpful :) |
FeatureRequest
I would like to have an attribute so I can set a value of time (maybe milliseconds) to request the button to remain-slided (sorry for my English) so the action would be effective. Or maybe not a time value but an attribute with a default inner time (as the long click).
In other words if I just slide the button it would bump as if it was locked. But if I keep it in the slided position for a time (as a long pressed button) it will unlock and perform the action.
Am I clear? Thank you very much!
The text was updated successfully, but these errors were encountered: