Reputation: 599
I'm working on a Google Glass app that uses a webview.
In the standard Google Glass browser, you can place two fingers on the touchpad and move your head around to pan the webpage. It also overlays a crosshairs that can be used to select links.
I am trying to figure out if there is a way to programmatically enable the head controlled panning and display the cross hairs within a webview? Has anybody come across an api that allows this?
Any help will be most appreciated.
Upvotes: 4
Views: 857
Reputation: 599
Here is my workaround on how to do this: https://github.com/mikesmales/GoogleGlassCrosshairs
Upvotes: 0
Reputation: 596
As said above, this is a feature of the built-in browser. The default WebView doesn't have the cross-hairs overlay, nor does it detect Gestures. You may have to implement a GestureListener and have it send Javascript events using loadUrl().
Here's a link to the SDK For GestureListeners: https://developers.google.com/glass/develop/gdk/input/touch
Upvotes: 0