模拟鼠标MotionEvent.ACTION_DOWN:

new Thread () { public void run () { try { Instrumentation inst=new Instrumentation(); inst.sendPointerSync(MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, 240, 400, 0)); inst.sendPointerSync(MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, 240, 400, 0)); } catch(Exception e) { Log.e("Exception when sendPointerSync", e.toString()); } } }.start();

更多相关文章

  1. adb连接不上模拟器的问题
  2. eclipse 新建 android 项目时,问题汇总
  3. android 模拟按键单值/多值输入
  4. android ------ Emulator: error: x86 emulation currently requ
  5. android 模拟抢红包 原理
  6. Android--学习笔记--02--AndroidStudio的设置
  7. android 127.0.0.1/localhost connection refused 问题的
  8. 植物大战僵尸2 Android破解版,免费买道具
  9. Android(安卓)使用模拟位置(支持Android(安卓)6.0)

随机推荐

  1. android颜色代码
  2. 【Android】自定义权限
  3. Android 电量显示Widgets插件实现
  4. android FloatingActionButton
  5. android 调用摄像头
  6. Android(安卓)应用程序不能全屏显示
  7. Android版本名称、版本号、API level对应
  8. android manifest文件结构
  9. Android实现Bitmap高斯模糊效果
  10. Android如何判断当前字符串的组成情况(如: