BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   progress bar implementation (

debapriya.ray 01-23-2009 12:19 AM

progress bar implementation
I have 2 screens that extend main screen.From one I call the other thru pushModalScreen..In the first I have called a thread that executes for sometime and then It automatically moves to the second.Now thruout this time I want to show a progress bar so tht the user sees tht something's happening.can you please tell me how to...The ist screen code is

The ist screen is splash and the second login........................

public class Splash extends UiApplication {
static boolean first = false;
static SplashScreen splashS;

public static void main(String[] args) {
if (!first) {
Splash theApp = new Splash();
System.out.println("Splash screen entered ");
first = true;



public Splash() {
SplashScreen splashS = new SplashScreen();




final class SplashScreen extends MainScreen {

boolean m_bSplashActive = true;
long m_dwSplashTime = 2000;
boolean m_bPaused = false;

public SplashScreen() {


LabelField title = new LabelField("Mobile Banking", LabelField.ELLIPSIS
| LabelField.USE_ALL_WIDTH);
add(new SeparatorField());
add(new RichTextField("Welcome!", RichTextField.NON_FOCUSABLE));

Bitmap myBitMap=Bitmap.getBitmapResource("mb.JPG");
BitmapField bitmapField=new BitmapField(myBitMap);
add(new SeparatorField());



public boolean onClose() {
Dialog.alert("You are exiting the application!");
return true;

public static void nextPage() {
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
UiApplication.getUiApplication().getActiveScreen() .invalidate();
try {
} catch (InterruptedException e) {
// TODO Auto-generated catch block



simon.hain 01-23-2009 03:53 AM

for progressscreens i use a popupscreen. you can use a gaugefield or implement similar behaviour with timertask and the draw method.
or you can use an animation via a series of pictures that are changed, again using a timertask.

debapriya.ray 01-23-2009 07:32 AM

Thank you

All times are GMT -5. The time now is 08:41 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.