共用方式為


MotionEvent.GetSize(Int32) Method

Definition

Returns a scaled value of the approximate size for the given pointer <em>index</em> (use #getPointerId(int) to find the pointer identifier for this index).

[Android.Runtime.Register("getSize", "(I)F", "")]
public float GetSize (int pointerIndex);
[<Android.Runtime.Register("getSize", "(I)F", "")>]
member this.GetSize : int -> single

Parameters

pointerIndex
Int32

Raw index of pointer to retrieve. Value may be from 0 (the first pointer that is down) to #getPointerCount()-1.

Returns

Attributes

Remarks

Returns a scaled value of the approximate size for the given pointer <em>index</em> (use #getPointerId(int) to find the pointer identifier for this index). This represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events.

Java documentation for android.view.MotionEvent.getSize(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to