AndreiMisiukevich / TouchEffect

UI-responsive touch effects for Xamarin.Forms
MIT License
195 stars 33 forks source link

Long Press [Enhancement] #58

Closed ElishaMisoi closed 4 years ago

ElishaMisoi commented 4 years ago

Would be really great if you added a long press command binding.

AswinPG commented 4 years ago

I did something to achieve long press. Which I think is really lazy coding. I look at the touch state and while the state is pressed I start a timer. if the timer exceeds a particular value then long press will be fired. If this implementation is good enough I'd like to create a PR. But I think that I'm doing it wrong. If someone could show me the right way I can try that and create a good PR with the correct implementation

AndreiMisiukevich commented 4 years ago

I did something to achieve long press. Which I think is really lazy coding. I look at the touch state and while the state is pressed I start a timer. if the timer exceeds a particular value then long press will be fired. If this implementation is good enough I'd like to create a PR. But I think that I'm doing it wrong. If someone could show me the right way I can try that and create a good PR with the correct implementation

Why not. It could work. Just need to make sure that visual works as expected + Long press is not fired several times )

AswinPG commented 4 years ago

I did something to achieve long press. Which I think is really lazy coding. I look at the touch state and while the state is pressed I start a timer. if the timer exceeds a particular value then long press will be fired. If this implementation is good enough I'd like to create a PR. But I think that I'm doing it wrong. If someone could show me the right way I can try that and create a good PR with the correct implementation

Why not. It could work. Just need to make sure that visual works as expected + Long press is not fired several times )

Ok. I'll PR as soon as I am free then

AndreiMisiukevich commented 4 years ago

Implemented :)

AswinPG commented 4 years ago

Oops. It was a really busy week. @AndreiMisiukevich Awesome as always. You are great