Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android onTouch事件在Galaxy S3中不起作用_Android - Fatal编程技术网

Android onTouch事件在Galaxy S3中不起作用

Android onTouch事件在Galaxy S3中不起作用,android,Android,我正在开发一个android应用程序,其中我覆盖了活动的onTouchEvent,并在按下屏幕时打开一个新活动。 它在谷歌NexusS(升级到Android 4.0.4)和三星GalaxyS2(2.3.4)上运行得非常好。 但当我在三星Galaxy S3上运行应用程序时,触摸屏幕时,我无法进入下一步。 S3的触摸事件处理有什么不同吗 public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) {

我正在开发一个android应用程序,其中我覆盖了活动的onTouchEvent,并在按下屏幕时打开一个新活动。 它在谷歌NexusS(升级到Android 4.0.4)和三星GalaxyS2(2.3.4)上运行得非常好。 但当我在三星Galaxy S3上运行应用程序时,触摸屏幕时,我无法进入下一步。 S3的触摸事件处理有什么不同吗

public boolean onTouchEvent(MotionEvent event) { 
    switch (event.getAction()) { 
    case MotionEvent.ACTION_DOWN: 
        break; 
    case MotionEvent.ACTION_MOVE: 
        break; 
    case MotionEvent.ACTION_UP: 
        Intent mIntent = new Intent(getApplicationContext(), screen3.class);
        startActivity(mIntent);
        break; 
    } 
    return true; 
}

是否只有拖动手势不起作用,或者当您松开手指时,对象会改变其位置?请发布onTouch代码以下是覆盖触摸事件代码:公共布尔onTouchEvent(MotionEvent事件){switch(event.getAction()){case MotionEvent.ACTION\u DOWN:break;case MotionEvent.ACTION\u MOVE:break;case MotionEvent.ACTION\u UP:Intent minent=new Intent(getApplicationContext(),screen3.class);startActivity(minent);break;}返回true;}为什么不设置一个
onClickListener()
如果活动在主视图上?是否只有拖动手势不起作用,或者当您松开手指时,对象会改变其位置?请发布onTouch代码以下是覆盖触摸事件代码:公共布尔onTouchEvent(MotionEvent事件){switch(event.getAction()){case MotionEvent.ACTION\u DOWN:break;case MotionEvent.ACTION\u MOVE:break;case MotionEvent.ACTION\u UP:Intent minent=new Intent(getApplicationContext(),screen3.class);startActivity(minent);break;}返回true;}如果活动失败,为什么不在主视图上设置一个
onClickListener()