How to enable the haptic feedback (vibration) within a WebView?
I've been having a look to the built-in haptic feedback you can enable trough the KickBack setting on the Accesibility menu. It works like I expected on most of UI elements.
For those who are not aware of what haptic feedback is, it's very simple, just vibrate slighty as the user presses any button/key/field.
Well, my problem is about enabling that feaure on a WebView interface. I made sure to enable it by calling WebView.setHapticFeedbackEnabled(true)
, but it wouldn't work. I also tried using the native Android Web Browser, but the haptic feedback is not enabled on there either.
I was wondering if someone has some tip on how to manually set that feedback for the WebView, cause I've been having a look to the API, and can't get any idea.
PD: I'm developing for FroYo on开发者_Python百科 a Nexus One with 2.2.1.
Regards!
This is currently not possible since the default WebView control is not accessible. This will be fixed in Android 3.0, according to this blog entry If you must get accessibility working for web content displayed in your app take a look at IDEAL Web Reader It's open source so you may be able to use some of their code or ideas in your own application.
精彩评论