Saturday, January 2, 2010

Tensile Drag, Centered Lists And Faster Slide

Running ahead I often forget that not everyone monitors our SVN commits so you don't all follow the latest and greatest in LWUIT (BTW to do so just go to the project mailing lists and subscribe to the commits mailing list to receive detailed commit notifications).
Three cool new things made their way into LWUIT two of which relate to touch support. The first is tensile drag demonstrated in the video to your right, this provides the feel of reaching the edge of the screen in a more physical way. This feature is now enabled for all LWUIT widgets seamlessly.
We now also support dragging on a list which is fixed on the screen vertically or horizontally (such as a carousel), this was ridiculously hard to implement and a long standing bug in our issue tracker. Fixed lists for those of you who haven't played with them, allow a developer to place the focus in a single point (top, bottom or center) and have the list scroll without the focus moving. This feature is essential for the spinner support and also allows very elaborate cool UI's.

Last but possibly most important is the fast slide transition support, some devices are relatively slow to render elaborate graphics (e.g. fonts). S60 specifically is very slow in this regard (reasonably justified since its fonts are quit crisp), LWUIT is quite efficient in font rendering however when running a slide transition rendering these fonts for every frame often bogs down the system. LWUIT now has a "fast slide" transition within the common transitions class that slides two images of the forms rather than the actual forms. This is noticeably faster on S60 devices but is also reasonably smoother on other devices.

This feature isn't enabled by default for two major reasons, the first is its higher RAM requirements and the second is that it breaks the ability to slide translucent/rounded menus/dialogs. However, if you don't intend to use these it might be worthwhile to switch to this transition for a smoother feel.

5 comments:

  1. The faster slide sounds exciting. I remember trying slide transitions on my good ol' Nokia 3110 Classic and getting a lot of "Oohs" and "Aaahs". However, when I ran the same transitions on a friend's Nokia N95, they were frightfully slow! Let me give the fast transitions a go. :)

    ReplyDelete
  2. what emulator do you use that has touch support?

    ReplyDelete
  3. Hello Shai,
    I can't figure out how to use a FIXED on CENTER list that isn't CICLYC (so it stops when reach the edge)?
    Thanks

    ReplyDelete
  4. Fixed center is always cyclic by design, we don't think it looks good otherwise.

    ReplyDelete