A Nokia example application combining three different user interface implementations for presenting list based data: split view, list view, and grid view. The split view and the grid view utilise a custom grid layout. The list items in the split view are also custom items. All the views in the application are Form based. This example also demonstrates how to manage persistent data, including storing and restoring the application state.
The application is hosted in GitHub: https://github.com/nokia-developer/composed-ui
For more information on the implementation, visit Java Developer's Library: http://developer.nokia.com/Resources/Library/Java/#!code-examples/lcdui-%E2%80%93-composedui.html
Java ME basics
The root package, com.nokia.example.composedui, contains the main classes which manage the application. In addition to Main MIDlet class, the root package contains the interface for managing views and TabManager. The TabManager is a container for the three main views in the application: split view, list view, and grid view.
The model package holds the application data implementation, and has no relation to the user interface (UI) at all. The traditional separation of UI and application logic is applied to the design of Composed UI app. The classes in model package are DataItem, ItemStorage, and interfaces for listening changes of the instances of these classes. ItemStorage is a container for holding individual DataItems. A single list or grid item in the UI is visual presentation of a single DataItem.
The utils package provides tools for the model for managing the record store (AppDataStorage, RecordStoreHelper) and for the UI for managing images (ImageUtils). The PersistableState interface is implemented by the views so that their state can be preserved in a generic way.
The views package contains all the views in the application. The three main ones are split view, list view, and grid view. The other views are item view which displays the data of a single item; item edit view for editing the item data; and item delete view for deleting multiple items at once.
The views.elements package contains the following custom components: GridLayout, GridItem, and IconListItem.
Nokia Asha software platform 1.0. Tested on Nokia Asha 501. Developed with Nokia Asha SDK 1.0.
Make sure you have the following installed:
- Nokia Asha SDK 1.0.
The example has been created with Nokia Asha SDK 1.0. To open the projet in the SDK, select File -> New -> MIDlet Project. Insert the project name, e.g. "ComposedUI". Then select "Create project" from existing source and browse to the folder you have the project in. Click Finish.
You can install the application on a phone by transferring the JAR or JAD file in Mass storage mode or over Bluetooth. Nokia Suite can be used with Series 40 phones. For further information, see http://www.developer.nokia.com/Resources/Library/Java/#!introduction-to-java-me/deployment-options.html
Locate the file with file browser and tap to install. Then find the application icon in the application menu and tap it to launch.
See the license text file delivered with this project. The license file is also available online at https://github.com/nokia-developer/composed-ui/blob/master/Licence.txt
- 1.1 Image file management refactored including some bug fixes
- 1.0 The first release