views:

208

answers:

2

Hi guys!

I'm developing a J2ME application, and I need to show a .png picture, then right beneath it, a list of strings from which the user can select one. Since you can't append an image to a List, I tried using a Form, appending an ImageItem to it, then appending an ChoiceGroup with the options. This works very well on the Sun WTK emulator.

But now, I tried it on my phone (Nokia 5800) and it only shows the beginning of the options, since it will only let them fit on a single line. So, instead of having:

  • I had a lovely evening yesterday.
  • I had dinner with some friends.

It will show something like:

  • I had a lov...
  • I had dinne...

Which obviously it's not ideal. However, if I select 1 option, the complete text appears hovering in a little box.

The problem is, I tried this on Nokia S60 3rd edition emulator, and the little box doesn't appear, only the options cut short.

Is there any way to get around this to have an image then a list of options that the user can select? I've been reading about Custom Items, but it seems very complicated for essentially something that should be very simple. Maybe someone knows an already done implementation of a Custom Item that does this?

Any help at all will be much appreciated :-) Thanks!

A: 

If you're targetting the Nokia 5800, you need to use the Series60 5th edition SDK emulator.

It is available from forum nokia and allows both C++ and J2ME development.

Hopefully, that should make the emulator's behaviour consistant with the device's.

I assume the device displays something that is more to you liking once you switch to landscape mode by pivoting the device...

If you want to target widely different phones (240x320 screen with keypad versus 360x640 touchscreen), you probably need to make at least 2 versions of your MIDlet GUI.

For the touchscreen, I would advise adding some StringItem to a Form using the StringItem.BUTTON appearance mode. I would hope that Nokia realized they needed to have the Form's ItemStateListener react to the user clicking on an Item.

QuickRecipesOnSymbianOS
Sorry, I didn't explain myself correctly. I'm targeting the whole range of MIDP 2.0 devices, that's why I use the Nokia S60 3rd edition emulator and the Nokia 5800, to see the different presentation between them. Anyway, after a whole day of scratching my head thinking about Custom Lists and arranging elements on small screens, I provisionally added several strings to a Form with numbers, then used a ChoiceGroup beneath with opt.1, opt.2... to select between them. It's not ideal, but unless I can think of something else, this will have to do... thanks for your comment, tho!
Duriel
+1  A: 

Take a look at LWUIT, otherwise you are going to have to implement word wrapping yourself for a lot of the components easier to not reinvent the wheel

kgutteridge