Hi there,
I’m having some issues with the new Widget 2.0 with button taps being registered properly when the buttons are housed within a scrollview.
If you tap incredibly quickly or move your finger a tiny fraction (which a lot of people do by accident), a scroll is registered rather than a button press. I didn’t originally see it as an issue as I tend to tap fairly firmly and hold that tap for a split second. But a few customers have mentioned that the buttons aren’t registering their taps and I suspect it’s because they’re tapping too quickly or moving their finger slightly during the tap process.
With the old ScrollView / Button I was using (before Widget 2.0), I put a bit of code within the “move” phase of the button handler which checked how far a user had moved their finger and passed focus back to the ScrollView if it was beyond a certain amount. This was great because I could decide the amount of movement I allowed before it became a “scroll” rather than a “tap”. The code I was using was very similar to that between lines 12 and 18 of this piece of code - https://gist.github.com/jonbeebe/1590908 using takeFocus (which is no longer supported). I found the standard 5 pixels of movement too little so changed it to 8 which worked better (my apps are for children so their tapping tends to be a little less precise).
I can no longer do that as far as I can tell, so I’m stuck with what Corona decided and it’s not working for some people.
Is there a way round this so I can get control of the amount of movement allowed before a scroll is registered rather than a button tap?
Also, is there a way of saying that any tap is a tap until movement beyond a certain amount occurs and then it’s a scroll? That would solve the very quick taps not being registered too I presume.
I really don’t want to go back to the old way of doing things as a.) it would take forever to replace all the new Widget 2 buttons and scrollViews and b.) I’d rather be using the most recent Corona code for the sake of future support etc.
Thanks in advance for any help.
All the best,
Ian
