diff options
author | Jose Alcerreca <jalc@google.com> | 2014-12-05 10:22:43 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-05 10:22:45 +0000 |
commit | 58e11abfe83aa56ec46fa92ac3abd52a2628fc35 (patch) | |
tree | 0a937376a26129987f184f85e3f76ccfe63667ae /input | |
parent | 658f13c33c803b8072a3f2700a0c38ff9a36696d (diff) | |
parent | a07d3946f8b3e146cb4bafae97039b17af99ddc9 (diff) | |
download | android-58e11abfe83aa56ec46fa92ac3abd52a2628fc35.tar.gz |
Merge "Updates metadata for BasicGestureDetect sample." into lmp-docs
Diffstat (limited to 'input')
-rw-r--r-- | input/gestures/BasicGestureDetect/screenshots/1-main.png | bin | 0 -> 67342 bytes | |||
-rw-r--r-- | input/gestures/BasicGestureDetect/screenshots/icon-web.png | bin | 0 -> 75748 bytes | |||
-rw-r--r-- | input/gestures/BasicGestureDetect/template-params.xml | 38 |
3 files changed, 38 insertions, 0 deletions
diff --git a/input/gestures/BasicGestureDetect/screenshots/1-main.png b/input/gestures/BasicGestureDetect/screenshots/1-main.png Binary files differnew file mode 100644 index 00000000..e7c3419f --- /dev/null +++ b/input/gestures/BasicGestureDetect/screenshots/1-main.png diff --git a/input/gestures/BasicGestureDetect/screenshots/icon-web.png b/input/gestures/BasicGestureDetect/screenshots/icon-web.png Binary files differnew file mode 100644 index 00000000..04d0248c --- /dev/null +++ b/input/gestures/BasicGestureDetect/screenshots/icon-web.png diff --git a/input/gestures/BasicGestureDetect/template-params.xml b/input/gestures/BasicGestureDetect/template-params.xml index fc8b48d1..cacdd0d0 100644 --- a/input/gestures/BasicGestureDetect/template-params.xml +++ b/input/gestures/BasicGestureDetect/template-params.xml @@ -39,4 +39,42 @@ <common src="logger"/> <common src="activities"/> + <metadata> + <status>PUBLISHED</status> + <categories>UI, Input</categories> + <technologies>Android</technologies> + <languages>Java</languages> + <solutions>Mobile</solutions> + <level>INTERMEDIATE</level> + <icon>screenshots/icon-web.png</icon> + <screenshots> + <img>screenshots/1-main.png</img> + </screenshots> + <api_refs> + <android>android.view.GestureDetector</android> + <android>android.view.MotionEvent</android> + </api_refs> + <description> +<![CDATA[ +This sample detects gestures on a view and logs them. In order to try this +sample out, try dragging or tapping the text. +]]> + </description> + <intro> +<![CDATA[ +In this sample, the gestures are detected using a custom gesture listener that extends +[SimpleOnGestureListener][1] and writes the detected [MotionEvent][2] into the log. + +In this example, the steps followed to set up the gesture detector are: +1. Create the GestureListener that includes all your callbacks. +2. Create the GestureDetector ([SimpleOnGestureListener][1]) that will take the listener as an argument. +3. For the view where the gestures will occur, create an [onTouchListener][3] +that sends all motion events to the gesture detector. + +[1]: http://developer.android.com/reference/android/view/GestureDetector.SimpleOnGestureListener.html +[2]: http://developer.android.com/reference/android/view/MotionEvent.html +[3]: http://developer.android.com/reference/android/view/View.OnTouchListener.html +]]> + </intro> + </metadata> </sample> |