blob: 8f402605a9b68dfb05a45033b3be64e8bd512cab [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.view;
18
19/**
20 * Constants to be used to perform haptic feedback effects via
21 * {@link View#performHapticFeedback(int)}
22 */
23public class HapticFeedbackConstants {
24
25 private HapticFeedbackConstants() {}
26
Dianne Hackbornddca3ee2009-07-23 19:01:31 -070027 /**
28 * The user has performed a long press on an object that is resulting
29 * in an action being performed.
30 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031 public static final int LONG_PRESS = 0;
32
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080033 /**
Dianne Hackbornddca3ee2009-07-23 19:01:31 -070034 * The user has pressed on a virtual on-screen key.
35 */
36 public static final int VIRTUAL_KEY = 1;
Adam Powell0b8bb422010-02-08 14:30:45 -080037
38 /**
Amith Yamasani04994982010-02-10 15:24:49 -080039 * The user has pressed a soft keyboard key.
40 */
41 public static final int KEYBOARD_TAP = 3;
42
43 /**
Dianne Hackborn6af0d502009-09-28 13:25:46 -070044 * This is a private constant. Feel free to renumber as desired.
45 * @hide
46 */
47 public static final int SAFE_MODE_DISABLED = 10000;
48
49 /**
50 * This is a private constant. Feel free to renumber as desired.
51 * @hide
52 */
53 public static final int SAFE_MODE_ENABLED = 10001;
54
55 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080056 * Flag for {@link View#performHapticFeedback(int, int)
57 * View.performHapticFeedback(int, int)}: Ignore the setting in the
58 * view for whether to perform haptic feedback, do it always.
59 */
60 public static final int FLAG_IGNORE_VIEW_SETTING = 0x0001;
61
62 /**
63 * Flag for {@link View#performHapticFeedback(int, int)
64 * View.performHapticFeedback(int, int)}: Ignore the global setting
65 * for whether to perform haptic feedback, do it always.
66 */
67 public static final int FLAG_IGNORE_GLOBAL_SETTING = 0x0002;
68}