2.3新添加了一个重载的MotionEvent.obtain(),如何利用这个API模拟两点放大缩小操作 大家都说 multitouch unit testing 不能用 standard Android framework Instrumentation来测试。我没试过,就这么一直认为着,没发现谁测成功。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://stackoverflow.com/questions/3637044/generating-multitouch-motionevents-for-testing这里貌似有人成功了,不过没贴代码 MotionEvent.obtain(downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, 2, new int[] {0, 1}, new MotionEvent.PointerCoords[] {pointerCoordsOneEnd, pointerCoordsTwoEnd}, 0, 0.0f, 0.0f, 0, 0, 0, 0);的ACTION设置不正确1按下 → MotionEvent.ACTION_DOWN2按下 → MotionEvent.ACTION_POINTER_DOWN+(motionEvent2Index<<MotionEvent.ACTION_POINTER_INDEX_SHIFT)移动 → MotionEvent.MOVE2离开 → MotionEvent.ACTION_POINTER_UP+(motionEvent2Index<<MotionEvent.ACTION_POINTER_INDEX_SHIFT)1离开 → MotionEvent.ACTION_UP其中motionEventXIndex为PointerPropertiesArray, PointerCoords中该MotionEvent的Index android如何自动获取DNS linux下android开发,eclipse找不到手机设备 ListView 焦点移动 Android版的Javaeye新闻阅读器 about AlertDialog FileDescriptor.sync怎么用? sql server to sqlite问题 android 叉叉助手 弹幕原理 help! android调入xml界面显示慢的问题 (Android)GridView里面放置获取网络上的图片,每次进入到GridView里面,图片的显示顺序都不一样。 怎样在代码中把framelayout里的某一层放到最顶层
这里貌似有人成功了,不过没贴代码
2, new int[] {0, 1}, new MotionEvent.PointerCoords[] {pointerCoordsOneEnd, pointerCoordsTwoEnd}, 0, 0.0f, 0.0f, 0, 0, 0, 0);的ACTION设置不正确1按下 → MotionEvent.ACTION_DOWN
2按下 → MotionEvent.ACTION_POINTER_DOWN+(motionEvent2Index<<MotionEvent.ACTION_POINTER_INDEX_SHIFT)
移动 → MotionEvent.MOVE
2离开 → MotionEvent.ACTION_POINTER_UP+(motionEvent2Index<<MotionEvent.ACTION_POINTER_INDEX_SHIFT)
1离开 → MotionEvent.ACTION_UP其中motionEventXIndex为PointerPropertiesArray, PointerCoords中该MotionEvent的Index