Closed polhomarkho closed 2 years ago
Hi!
I just added a small change to consider MotionEvent.ACTION_CANCEL
as an MotionEvent.ACTION_UP
as the onRelease
callback didn't fire sometimes.
I noticed in the doc that it should be handled like that : https://developer.android.com/reference/android/view/MotionEvent#ACTION_CANCEL
It works perfectly in my setup so I merged it. Sorry it took so long, I even didnt have android studio installed in my system 😅
I will keep checking the other pull requests.
What it would be nice is to include all of this new changes as examples. I'm planning to clean a bit this repo during the week and merge the examples and WebIDE repo here.
So I will ping you again once everything is merged :) Thanks again!
Hi!
Thank you for checking it out!
I need to figure out how the documentation and examples work but I'll add them for sure.
Don't worry about the time it took! Big 👍 for reinstalling android studio and taking the time to review and merge 😉
Hi!
I needed to have two kind of new callbacks triggered for a button: "onPress" and "onRelease".
I'm currently extending the midi capabilities of Phonk to create a midi controller to drive my soft synth on my computer and I needed to add these callbacks to trigger the notes. The midi part will be in an other PR as I need to add more methods (but it's working, yay!).
The new callbacks are fully compatible with the existing "onLongPress" and "onClick" :
Will produce: