The “touchmove” event on android system: Transformer Prime

后端 未结 1 1279
有刺的猬
有刺的猬 2020-12-14 21:26

I am working on a Transformer Pad and developing a drawing plate. I use PhoneGap(javascript) to write the code instead of JAVA.

But the touchmove event is quite we

相关标签:
1条回答
  • Oh, Jesus. I finally find the answers: Please take reference for this site.

    If you work on an Android System,remember the 'touchmove' only fire ONCE as your finger moves around the pad. So if you wanna draw a line or something, you have to do this:

    function onStart ( touchEvent ) {
    if( navigator.userAgent.match(/Android/i) ) {   // if you already work on Android system, you can        skip this step
    touchEvent.preventDefault();     //THIS IS THE KEY. You can read the difficult doc released by W3C to learn more.
    }
    

    And if you have more time, you can read the W3C's document about introducing the 'movetouch', it is REALLY hard to understand. The doc sucks.

    0 讨论(0)
提交回复
热议问题