Sdílet prostřednictvím


MotionEvent.GetPressure(Int32) Method

Definition

Returns the current pressure of this event for the given pointer <em>index</em> (use #getPointerId(int) to find the pointer identifier for this index).

[Android.Runtime.Register("getPressure", "(I)F", "")]
public float GetPressure (int pointerIndex);
[<Android.Runtime.Register("getPressure", "(I)F", "")>]
member this.GetPressure : 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 the current pressure of this event for the given pointer <em>index</em> (use #getPointerId(int) to find the pointer identifier for this index). The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), however values higher than 1 may be generated depending on the calibration of the input device.

Java documentation for android.view.MotionEvent.getPressure(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