Question

I have a pair of Google glass and I would like to install an App for Tablet and smartphone I developed myself.

The App use the API 19 as well as the the Glass.

In this app I have a button and the view is to long for the glass, so we are only able to see the above of the page.

For now i am not able to scroll down the page nor to click on the button in order to go to the next activity. (it works fine on tablet and smartphone)

Do you know if there is a way to make this work without having to use CardViews ?

Thank you

Was it helpful?

Solution

Usually, it's hard to directly port a phone app to glassware. User interaction is totally different. I don't think you can literally click on the button using the touchpad so button's OnClickListener doesn't work.

Anyway, GDK has its own gesture listener API. You can check it here.

You can try detecting a scroll with ScrollListener:

gestureDetector.setScrollListener(new GestureDetector.ScrollListener() {
        @Override
        public boolean onScroll(float displacement, float delta, float velocity) {
            // do something on scrolling
        }
    });
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top