Sdílet prostřednictvím


InputDevice.SourceBluetoothStylus Field

Definition

Caution

This constant will be removed in the future version. Use Android.Views.InputSourceType enum directly instead of this field.

The input device is a Bluetooth stylus.

[Android.Runtime.Register("SOURCE_BLUETOOTH_STYLUS", ApiSince=23)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Views.InputSourceType enum directly instead of this field.", true)]
public const Android.Views.InputSourceType SourceBluetoothStylus = 49154;
[<Android.Runtime.Register("SOURCE_BLUETOOTH_STYLUS", ApiSince=23)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Views.InputSourceType enum directly instead of this field.", true)>]
val mutable SourceBluetoothStylus : Android.Views.InputSourceType

Field Value

Value = 49154

Implements

Attributes

Remarks

The input device is a Bluetooth stylus.

Note that this bit merely indicates that an input device is capable of obtaining input from a Bluetooth stylus. To determine whether a given touch event was produced by a stylus, examine the tool type returned by MotionEvent#getToolType(int) for each individual pointer.

A single touch event may multiple pointers with different tool types, such as an event that has one pointer with tool type MotionEvent#TOOL_TYPE_FINGER and another pointer with tool type MotionEvent#TOOL_TYPE_STYLUS. So it is important to examine the tool type of each pointer, regardless of the source reported by MotionEvent#getSource().

A bluetooth stylus generally receives its pressure and button state information from the stylus itself, and derives the rest from another source. For example, a Bluetooth stylus used in conjunction with a touchscreen would derive its contact position and pointer size from the touchscreen and may not be any more accurate than other tools such as fingers.

Java documentation for android.view.InputDevice.SOURCE_BLUETOOTH_STYLUS.

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