Activity field: gauge
Use a gauge field to create a horizontal bar to display a progress indicator or a numeric value.
Class
Supported since
BlackBerry Java SDK 4.2
More information
For more information about gauge fields, see the UI Guidelines.
Example
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.GaugeField;
import net.rim.device.api.ui.container.*;
public class GaugeFieldDemo extends UiApplication
{
public static void main(String[] args)
{
GaugeFieldDemo theApp = new GaugeFieldDemo();
theApp.enterEventDispatcher();
}
public GaugeFieldDemo()
{
pushScreen(new GaugeFieldDemoScreen());
}
}
class GaugeFieldDemoScreen extends MainScreen
{
public GaugeFieldDemoScreen ()
{
setTitle("Gauge Field Demo");
GaugeField percentGauge =
new GaugeField("Percent: ", 1, 100, 29, GaugeField.PERCENT);
add(percentGauge);
}
}