If a BlackBerry smartphone application must process information before displaying it for the BlackBerry smartphone user, displaying a progress bar for the application is especially important. While processing the information, the application must inform the BlackBerry smartphone user that it is still responsive and is preparing the requested data for display on the screen.
A GaugeField object can be used to display a progress bar while the application processes information.
The following code sample creates three different progress bars:
In the code sample above, the first GaugeField is the default progress bar. It is set as editable so the user can change the progress setting. The second progress bar shows the progress in terms of percentages. The last progress bar does not display any text in the progress bar and displays a blank gauge. All three progress bars have a minimum value of 0 and maximum value of 30. They are initialized to display progress to the halfway point.
The following is an image of the three progress bars from the code sample above: