Rich list

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.

Class RichList
Supported since BlackBerry® Java® SDK 6.0
Example This screen shows a rich list.

For more information about rich lists, see the UI Guidelines.

Code sample: Creating a rich list

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.system.*;
import net.rim.device.api.ui.component.table.*;

public class RichListDemo extends UiApplication

    public static void main(String[] args)
        RichListDemo theApp = new RichListDemo();       
    public RichListDemo()
        pushScreen(new RichListScreen());
    private static class RichListScreen extends MainScreen
        public RichListScreen()
            setTitle("Rich List Demo");
            add(new LabelField("BlackBerry Devices", LabelField.FIELD_HCENTER));
            add(new SeparatorField());
            Manager mainManager = getMainManager();
            RichList list = new RichList(mainManager, true, 2, 1);
            Bitmap bitmap1 = Bitmap.getBitmapResource("9500.png");
            Bitmap bitmap2 = Bitmap.getBitmapResource("9000.png");
            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."});
Next topic: Table
Previous topic: Simple list

Was this information helpful? Send us your comments.