I want to customize a ListField in BlackBerry which would be able to list an image and text in a row.
How to accomplish this?
I want to customize a ListField in BlackBerry which would be able to list an image and text in a row.
How to accomplish this?
Without knowing more detail about what you're trying to do, I'd suggest taking a look at some of the sample apps that ship with the BlackBerry development environment. Several of the apps such as Contacts.java and PhoneApiDemo.java have a ListField
and ListFieldCallback
implemenation.
Starting with BlackBerry Java SDK 6.0 you can use a RichList
:
Use a rich list to display a list of items that contain an optional image on the left, a list of labels beside the image and an optional description below the image and labels
RichList list = new RichList(mainManager, true, 2, 1);
list.add(new Object[] {bitmap1, "Device 1",
"BlackBerry Smartphone 9500",
"Description of Device 1."});
list.add(new Object[] {bitmap2, "Device 2",
"BlackBerry Smartphome 9000",
"Description of Device 2."});
Try something like this:
See code from rtm4bb - A BlackBerry Client for Remember the Milk: