Lemur MultiTouch Support for Android

As @pspeed has mentioned before, the Lemur ui library fully supports Android, including multi-touch.

I just wanted to post a short demonstration showing Lemur’s multi-touch support in a little app I wrote. The app uses Lemur to handle all inputs. Since there are no mouse pointers on Android, I added little blue dots so that you could see where the touch events are happening.

When touch input is available, Lemur uses the touch events to simulate mouse events so the application code doesn’t know the difference. In the linked video below, the same application code is used for running the app on desktop or Android.

The date selection spinners are using Lemur’s MouseListeners to get notified of the user clicking on the spatial and moving the mouse so the app can rotate the spinner. The mouse button and motion events are only reported to the spatials that are picked by the internal Lemur Ray which makes the code very simple to use (no need to do any scene picking yourself).

The date label at the bottom is also using Lemur’s BorderLayout and Label component.




Cool video! Retroactive thanks for hooking up the touch event side of lemur pick events. :slight_smile:

One more video to share. This one is the BasicDemo class provided with Lemur.

This also shows Multi-Touch with either multiple Sliders or with Sliders + Draggable objects.

When a Slider is touched, the mouseEntered method is called which, in this case, indicates the slider is active by highlighting it (change the slider button to Yellow) The UP touch event causes the mouseExited method to be called which turns off the highlighting.

On Desktop, the mouseEntered and mouseExited methods are called when the mouse is moved over the objects (ie, hovering). However, with touch, hovering doesn’t really exist. You either touch the screen or you don’t. Even so, Lemur makes sure to call the same methods before and after the touch events to keep the application code common between the 2 platforms.


1 Like

Really impressive! The video is currently “unlisted”, which can cause problems on Twitter and such, where it will soon make an appearance :stuck_out_tongue: Could you please fix that?

@iwgeric can you please share any sample app how this is implemented in jmonkey. I am graphic designer trying to build multi touch based graphical app. Please help