Gestures Builder: create your gestures library

Thảo luận trong 'Điện thoại, viễn thông' bắt đầu bởi bka15, 30/9/12.

  1. bka15 New Member

    bka15

    Tham gia ngày:
    18/7/12
    Bài viết:
    128
    Đã được thích:
    105
    Điểm thành tích:
    0
    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.



    [​IMG]


    • 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




    [​IMG]



    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:
    - Detection of Gesture
     
    Đang tải...
  2. vmagic New Member

    vmagic

    Tham gia ngày:
    26/2/13
    Bài viết:
    4
    Đã được thích:
    0
    Điểm thành tích:
    0
    Giới tính:
    Nam
    Mình có gesture rùi làm sao chèn nó vào edittext?
    khi mình vẽ chữ "a" thì hiện lên toast là "a" nhưng ko chèn vào ô edittext.
     

Chia sẻ trang này