煎茶触摸应用程序冻结时,多点触摸/ Android的 [英] Sencha Touch App freeze when multitouch / Android

查看:245
本文介绍了煎茶触摸应用程序冻结时,多点触摸/ Android的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建了一个煎茶触摸(2.1.0)的应用程序和测试它在我的三星Galaxy S2(Android版4.0.3)。
有一次,我这样做,与snecha CMD的本地生成命令,另一个我PhoneGap的包裹吧。
这两次我有一个冻结当我触摸屏幕用两个手指同时。
我不能preSS一个按钮或滚动了。

I built a sencha touch (2.1.0) app and tested it on my Samsung Galaxy S2 (Android 4.0.3). Once I did that with the native build command of snecha cmd and another I wrapped it with phonegap. Both times I've got a freeze when I touch the screen with two fingers at the same time. I cannot press a button or scroll anymore.

有没有人为该问题的解决方案?

Has anyone a solution for that problem?

我也看到在煎茶论坛上的帖子( http://www.sencha.com/forum/showthread.php?249581-Multi-touch-and-phonegap ),但是这并没有对我的工作还是我做错了什么。

I also read the post in the Sencha forum (http://www.sencha.com/forum/showthread.php?249581-Multi-touch-and-phonegap), but that did not work for me or I'm doing something wrong.

任何帮助将是AP preciable。

Any help would be appreciable.

推荐答案

结果
最近,我遇到了这个问题,并参观了煎茶论坛链接,您提到的,在我的code这实现以下付诸实施。结果
1.修复纳入应用程序将不会与自来水同时冻结。结果
2.您将必须从某个地方在屏幕上点击一次,你两个或多个点同时更早挖掘后。结果


I recently came across this problem and visited the Sencha Forum link you mentioned and implemented it in my code which achieve the following.
1. With the fix incorporated app will never freeze with simultaneous tap.
2. You will have to tap somewhere on the screen one more time, after you simultaneously tapped at two or more points earlier.

请注意:这个问题只与Android 4.0.x和煎茶2.1重现性

Note: The issue is reproducible only with android 4.0.x and Sencha 2.1.

从煎茶论坛结果非常感谢特勒尔斯
在你app.js将您Ext.application外if条件如下图搜索

A big thanks to TROELS from Sencha Forum
In your app.js place the if condition outside your Ext.application as shown below


Ext.application({
    name:xyz
    requires:[abc]
    //other stuffs
    });

    if(Ext.os.is.Android && Ext.os.version.equals(4.0)) {

        Ext.define('app.overrides.TouchGesture', {
            override: 'Ext.event.publisher.TouchGesture',

            reset: function(e){
                if(Ext.os.version.equals(4.0) && this.currentTouchesCount > 0){
                    e.changedTouches = Ext.Object.getValues(this.currentTouches);
                    this.onTouchEnd(e);
                }
            }
        });


            window.orgPinchEndMethod = Ext.event.recognizer.Pinch.prototype.end;
            Ext.define('app.overrides.Pinch', {
            override: 'Ext.event.recognizer.Pinch',

            end: function(e){
            var wasTracking = this.isTracking,
            result = window.orgPinchEndMethod.apply(this, arguments);
            if(wasTracking){
                this._resetDetection(e);
            }
            return result;
        },

            _resetDetection: function(e){
                var tg = Ext.event.Dispatcher.getInstance().getPublishers().touchGesture;
                setTimeout(function(){
                    tg.reset(e);
                }, 0);
            }
           });

     }



这篇关于煎茶触摸应用程序冻结时,多点触摸/ Android的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆