• Android Coding: Gestures Builder: create your gestures library


    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.



    Create GesturesBuilder

    • 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




    GesturesBuilder



    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:
  • 相关阅读:
    vue1.0
    网络抓包(四)
    物联网框架ServerSuperIO
    Solrcloud(Solr集群)
    机器学习1
    TCP/IP协议族(一)
    ElasticSearch(简称ES)
    工具
    线程本地变量的使用
    Features of Spring Web MVC
  • 原文地址:https://www.cnblogs.com/lexus/p/2798398.html
Copyright © 2020-2023  润新知