开发者

Android: how to read system setting for vibration on key presses

How can I programmatically read the system setting for the virtual keybo开发者_运维问答ard? I want my app buttons to behave like it is set in the system settings for the virtual keyboard (beep, vibrate or nothing).


You should use performHapticFeedback for it. Do not forget to enable it for your views in layout xml.

View.performHapticFeedback

Use stock Haptic feedback

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜