Android Coding: Gestures Builder: create your gestures library

Sep 18, 2011

Gestures Builder: create your gestures library

Gesture is a prerecorded touch screen motion sequency. If user performs gesture as the prerecorded gesture, your app can recogized as a command.



Gestures API (android.gesture) was introduced in Android 1.6, lets you store, load, draw and recognize gestures. In order to use Gestures API, you need a prerecorded gestures library. The Android 1.6 SDK (or later) comes with a new application pre-installed on the emulator, called Gestures Builder. You can use this application to create a set of pre-defined gestures for your own application.



You can also find the source code of Gestures Builder in SDK samples, such that you can create it on true device to create your own gestures library.





  • In Eclipse, click File -> New - Project... to create a New Android Project.
  • Select "Create project from existing sample", select Build Target higher than 1.6, select GesturesBuilder in Samples, and click Finish.
  • Build and Run the App








After you Add gesture and DONE, a Toast will show you where is the gestures file saved, /mnt/sdcard/gestures (root of sd card) in my case. You can copy the gestures file to /res/raw folder of you gesture-enabled app as your gestures library.

next Post:

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. JavaScript学习笔记-JS中的异步编程
  2. 如何使用javascript或vbscript或jquery设
  3. 在rails中基于javascripts on / off处理H
  4. 代码点火-如何从控制器返回Json响应
  5. 在Javascript中将下拉字段乘以文本字段
  6. 如何在HTML页面中维护SWF文件的大小?
  7. Angularjs - NgTable在重新加载时未定
  8. 从屏幕外动画div,没有绝对位置?
  9. JavaScript的前世今生
  10. 是否可以知道文件是否在用户的浏览器缓存