简体   繁体   中英

how to include swype in windows phone 8 phonegap?

I am developing a phonegap application in windows phone 8, android, bb10, iphone.

i use quo.js for swyping in all platforms but it does not applied in wp8.

if you have any solution, please help me.

 $$('#wrapper').swipeLeft(function() 
 {
     //mycode
 });

See there link (official Windows Phone developer blog post).

The pointer API uses a standard “down, move, up” event model. Therefore, it's simple to hook up listeners for existing event handlers to pointer events.

Before

    this.element.addEventListener("touchstart", eventHandlerName, false); 
    this.element.addEventListener("touchmove", eventHandlerName, false);
    this.element.addEventListener("touchend", eventHandlerName, false);

After

    if (window.navigator.msPointerEnabled) {
      this.element.addEventListener("MSPointerDown", eventHandlerName, false);
      this.element.addEventListener("MSPointerMove", eventHandlerName, false);
      this.element.addEventListener("MSPointerUp", eventHandlerName, false);
    }
    this.element.addEventListener("touchstart", eventHandlerName, false);
    this.element.addEventListener("touchmove", eventHandlerName, false);
    this.element.addEventListener("touchend", eventHandlerName, false);

Turning off default touch behavior

The pointer event model in Internet Explorer 10 requires you to explicitly indicate which areas of the page will have custom gesture handling (using the code you just added), and which will use default gesture handling (pan the page). You can do this by adding markup on elements that should opt out of default gesture handling using the -ms-touch-action property. For example:

Before

<div id="slider" style="overflow: hidden;">

After

<div id="slider" style="overflow: hidden; -ms-touch-action: none;">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM