模拟鼠标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. android 模拟器中找不到程序
  2. Android(安卓)启动模拟器是出现“Failed to allocate memory: 8
  3. Android(安卓)模拟器安装及使用教程
  4. 32位ubuntu10.04编译Android4.0.1内核
  5. android常用命令
  6. Android开发工具使用之adb
  7. 如何在电脑上安装模拟器体验Android(安卓)4.0
  8. [Android--Tool][INSTALL_FAILED_INSUFFICIENT_STORAGE]问题及解
  9. Android(安卓)Studio 1.0 (稳定版) 完全攻略

随机推荐

  1. java 百度地图判断两点距离1
  2. 我的程序员成长之路
  3. java实现能计算10道基本运算的计算器
  4. 黑马程序员_Java基础_异常
  5. Java反射---getGenericSuperclass和Param
  6. java中循环遍历删除List和Set集合中元素
  7. getter on xmlbeans生成的类返回null,它不
  8. 如何从webview获取javascript值到android
  9. 当只使用get()和set()方法时,用原始类型替换At
  10. 蓝桥杯 ALGO-53 算法训练 最小乘积(基本