Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

HapticFeedbackConstants

public class HapticFeedbackConstants
extends Object

java.lang.Object
   ↳ android.view.HapticFeedbackConstants


Constants to be used to perform haptic feedback effects via View.performHapticFeedback(int)

Summary

Constants

int CLOCK_TICK

The user has pressed either an hour or minute tick of a Clock.

int CONTEXT_CLICK

The user has performed a context click on an object.

int FLAG_IGNORE_GLOBAL_SETTING

Flag for View.performHapticFeedback(int, int): Ignore the global setting for whether to perform haptic feedback, do it always.

int FLAG_IGNORE_VIEW_SETTING

Flag for View.performHapticFeedback(int, int): Ignore the setting in the view for whether to perform haptic feedback, do it always.

int KEYBOARD_PRESS

The user has pressed a virtual or software keyboard key.

int KEYBOARD_RELEASE

The user has released a virtual keyboard key.

int KEYBOARD_TAP

The user has pressed a soft keyboard key.

int LONG_PRESS

The user has performed a long press on an object that is resulting in an action being performed.

int TEXT_HANDLE_MOVE

The user has performed a selection/insertion handle move on text field.

int VIRTUAL_KEY

The user has pressed on a virtual on-screen key.

int VIRTUAL_KEY_RELEASE

The user has released a virtual key.

Inherited methods

Constants

CLOCK_TICK

added in API level 21
public static final int CLOCK_TICK

The user has pressed either an hour or minute tick of a Clock.

Constant Value: 4 (0x00000004)

CONTEXT_CLICK

added in API level 23
public static final int CONTEXT_CLICK

The user has performed a context click on an object.

Constant Value: 6 (0x00000006)

FLAG_IGNORE_GLOBAL_SETTING

added in API level 3
public static final int FLAG_IGNORE_GLOBAL_SETTING

Flag for View.performHapticFeedback(int, int): Ignore the global setting for whether to perform haptic feedback, do it always.

Constant Value: 2 (0x00000002)

FLAG_IGNORE_VIEW_SETTING

added in API level 3
public static final int FLAG_IGNORE_VIEW_SETTING

Flag for View.performHapticFeedback(int, int): Ignore the setting in the view for whether to perform haptic feedback, do it always.

Constant Value: 1 (0x00000001)

KEYBOARD_PRESS

added in API level 27
public static final int KEYBOARD_PRESS

The user has pressed a virtual or software keyboard key.

Constant Value: 3 (0x00000003)

KEYBOARD_RELEASE

added in API level 27
public static final int KEYBOARD_RELEASE

The user has released a virtual keyboard key.

Constant Value: 7 (0x00000007)

KEYBOARD_TAP

added in API level 8
public static final int KEYBOARD_TAP

The user has pressed a soft keyboard key.

Constant Value: 3 (0x00000003)

LONG_PRESS

added in API level 3
public static final int LONG_PRESS

The user has performed a long press on an object that is resulting in an action being performed.

Constant Value: 0 (0x00000000)

TEXT_HANDLE_MOVE

added in API level 27
public static final int TEXT_HANDLE_MOVE

The user has performed a selection/insertion handle move on text field.

Constant Value: 9 (0x00000009)

VIRTUAL_KEY

added in API level 5
public static final int VIRTUAL_KEY

The user has pressed on a virtual on-screen key.

Constant Value: 1 (0x00000001)

VIRTUAL_KEY_RELEASE

added in API level 27
public static final int VIRTUAL_KEY_RELEASE

The user has released a virtual key.

Constant Value: 8 (0x00000008)