Development Guide
• net.rim.device.api.ui.component.BasicEditField
2.
Create an instance of an AutoTextEditField.
AutoTextEditField autoT = new AutoTextEditField("AutoTextEditField: ",
"");
Create a progress bar field
1.
Import the net.rim.device.api.ui.component.GaugeField class.
2.
Create an instance of a GaugeField.
GaugeField percentGauge = new GaugeField("Percent: ", 1, 100, 29,
GaugeField.PERCENT);
Create a text label
1.
Import the net.rim.device.api.ui.component.LabelField class.
2.
Create an instance of a LabelField to add a text label to a screen.
LabelField title = new LabelField("UI Component Sample",
LabelField.ELLIPSIS);
Create a list from which users can select multiple items
1.
Import the following classes:
• java.lang.String
• net.rim.device.api.ui.component.ListField
• net.rim.device.api.ui.container.MainScreen
2.
Import the net.rim.device.api.ui.component.ListFieldCallback interface.
3.
Create a class that implements the ListFieldCallback interface.
private class ListCallback implements
ListFieldCallback {
4.
Create the items that you want to display in a ListField.
String fieldOne = new String("Mark Guo");
String fieldTwo = new String("Amy Krul");
5.
Create an instance of a ListField.
ListField myList = new ListField(0,ListField.MULTI_SELECT);
UI components
21