Chapter 5. Building a Pure Mobile App with GWT Mobile UI

So far we have used GWT to build a standard desktop web app then optimized it for mobile using CSS tricks. This approach will work for many projects, especially if you are repurposing existing content. However, if you want to make an app that really feels native then you need something more.

Native mobile apps typically have touch centric controls like scrolling lists, large buttons, navigation tabs, and animated screen to screen transitions. We could build these from scratch in GWT by using a lot of hand written CSS and Java code, but why do that when there are already great libraries out there which will do the job for us. For the next project we will use one such library: GWT Mobile UI.

GWT Mobile UI is an open source collection of GWT widgets specifically designed for mobile devices. It has input widgets (buttons and sliders) as well as different panels for mobile style layouts. It also has a nice framework for animated transitions from one screen to the next. With this framework in our toolkit we can create a mobile app that feels completely native without having to reinvent the wheel.

For this project I’m going to build an app I’ve always wanted: a wine journal. My wife and I love to try different wines but I always forget which ones we liked and where we drank them. I own a paper wine journal but I always forget to bring it with me when we go out to eat. Sounds like a job for a mobile app.

Designing the Wine Journal

Before ...

Get Building Mobile Applications with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.