正文
一般振动时间的配置在如下文件:
frameworks/base/core/res/res/values/config.xml
<!-- 长按振动 -->
- <!-- Vibrator pattern for feedback about a long screen/key press -->
- <integer-array name="config_longPressVibePattern">
- <item>0</item>
- <item>1</item>
- <item>20</item>
- <item>21</item>
- </integer-array>
复制代码
<!-- 虚拟按键振动 -->
- <!-- Vibrator pattern for feedback about touching a virtual key -->
- <integer-array name="config_virtualKeyVibePattern">
- <item>0</item>
- <item>10</item>
- <item>20</item>
- <item>30</item>
- </integer-array>
复制代码
<!-- 软键盘按键振动 -->
- <!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
- <integer-array name="config_keyboardTapVibePattern">
- <item>40</item>
- </integer-array>
复制代码
<!-- 非安全模式启动振动 -->
- <!-- Vibrator pattern for feedback about booting with safe mode disabled -->
- <integer-array name="config_safeModeDisabledVibePattern">
- <item>0</item>
- <item>1</item>
- <item>20</item>
- <item>21</item>
- </integer-array>
复制代码
<!-- 安全模式启动振动 -->
- <!-- Vibrator pattern for feedback about booting with safe mode disabled -->
- <integer-array name="config_safeModeEnabledVibePattern">
- <item>0</item>
- <item>1</item>
- <item>20</item>
- <item>21</item>
- <item>500</item>
- <item>600</item>
- </integer-array>
复制代码
上面以数组形式的表示的,奇数位置表示暂停时间,偶数位置表示振动时间,单位为 ms。
希望大家看到这篇文章能觉得有用,谢谢已阅者。更多安卓技术问题欢迎加群探讨:278744577,验证码:eec,不写验证不予通过哟~ |