You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.8 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<sample>
<name>BasicMultitouch</name>
<group>Input</group>
<package>com.example.android.basicmultitouch</package>
<!-- change minSdk if needed-->
<minSdk>14</minSdk>
<strings>
<intro>
<![CDATA[
This sample demonstrates the use of MotionEvent properties to keep track of individual touches
across multiple touch events.
\n\nTouch the screen with multiple fingers to show that the pointer id
(also represented by a color) does not change as new touch events are received.
]]>
</intro>
</strings>
<template src="base"/>
<common src="logger"/>
<metadata>
<status>PUBLISHED</status>
<categories>UI, Views, Input</categories>
<technologies>Android</technologies>
<languages>Java</languages>
<solutions>Mobile</solutions>
<level>INTERMEDIATE</level>
<icon>screenshots/icon-web.png</icon>
<screenshots>
<img>screenshots/intro.png</img>
<img>screenshots/touches.png</img>
</screenshots>
<api_refs>
<android>android.view.MotionEvent</android>
</api_refs>
<description>
<![CDATA[
Sample demonstrates the use of [MotionEvent][1] properties to keep track of
individual touches across multiple touch events.
[1]: http://developer.android.com/reference/android/view/MotionEvent.html
]]>
</description>
<intro>
<![CDATA[
This is an example of keeping track of individual touches across multiple
[MotionEvent][1]s.
This sample uses a custom View (`TouchDisplayView`) that responds to
touch events and draws a colored circle for each touch point. The view holds
data related to a touch pointer, including its current position, pressure,
and its past touch history.
The View draws graphics based on data associated with each touch event to a
canvas. A large circle indicates the current position of a touch, while smaller
trailing circles represent previous positions for that touch.
The size of the large circle is scaled depending on the pressure of the user's
touch.
[1]: http://developer.android.com/reference/android/view/MotionEvent.html
]]>
</intro>
</metadata>
</sample>