I already developed Rss Reader application in j2me (java) using KXML and LCDUI List
and Form
. When I run my application, I am able to display LCDUI list("Titles","Images") screen on device.
But I have a requirement that:
I am having 3 rss feed xml files and when I run my application, 3 xml files should be read and the output should be
only one screen:
on this screen I should be able to display 3 rss feed list screens (i.e each LCDUI list screen contains List of titles and Images from rss xml file)
How can I achieve above requirement in j2me?
The most straightforward way to put several lists with titles and images on one screen is to use ChoiceGroup objects inside a Form:
A
ChoiceGroup
is a group of selectable elements intended to be placed within a Form. The group may be created with a mode that requires a single choice to be made or that allows multiple choices. The implementation is responsible for providing the graphical representation of these modes and must provide visually different graphics for different modes. For example, it might use "radio buttons" for the single choice mode and "check boxes" for the multiple choice mode...
If your List is of EXCLUSIVE
or MULTIPLE
type, choice group having same type may be your closest-fit option. For IMPLICIT
type lists you may need to be more creative to keep user experience intact.
While moving to choice groups from lists, take into account specific API available for these kind items.
Eg, type POPUP
is intended to save screen space - you might want it to fit three lists on the same screen. There are also APIs like ItemStateListener
and ItemCommandListener
extending the ways to handle user input.
ChoiceGroup
are too limiting for what you are trying to achieve, consider using CustomItem instead, or maybe even 3rd party UI libraries like LWUIT or J2ME Polish.Another option (the one I would personally prefer) is to keep List
objects. It is quite unlikely that real user would specify their requirements in terms like "I need one lcdui Form object". Think of what functionality they really want and on how it could be achieved using Lists. To have a form with three choice groups might turn out to be less comfortable from user perspective compared to properly designed set of list-based screens.