List: simple
Use a simple list to display a list of items as text.
Class
Supported since
BlackBerry Java SDK 6.0
More information
For more information about simple lists, see the UI Guidelines.
Example
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.ui.component.table.*;
public class SimpleListDemo extends UiApplication
{
public static void main(String[] args)
{
SimpleListDemo theApp = new SimpleListDemo();
theApp.enterEventDispatcher();
}
public SimpleListDemo()
{
pushScreen(new SimpleListScreen());
}
private static final class SimpleListScreen extends MainScreen
{
public SimpleListScreen()
{
super(Manager.NO_VERTICAL_SCROLL);
setTitle("Simple List Demo");
add(new LabelField("My list", LabelField.FIELD_HCENTER));
add(new SeparatorField());
Manager mainManager = getMainManager();
SimpleList listField = new SimpleList(mainManager);
listField.add("Item 1");
listField.add("Item 2");
listField.add("Item 3");
}
}
}