PleaseWait PopUp during navigation in Blackberry Application

54 views Asked by At

Possible Duplicate:
Blackberry - Application loading screen

Pleasewait should be displayed on click then data should be loaded. Once the data is loaded, pleasewait poup should be dismissed..how to implement it? Code:1.At the end of SplashScreen:

UiApplication.getUiApplication().invokeLater(new Runnable()
    {
        public void run()
           {
               try 
               {
                   Thread.sleep(2000);                  
               } 
               catch (InterruptedException e)
               {
                   Dialog.alert(e.getMessage());
               }
               UiApplication.getUiApplication().popScreen(SplashScreen.this);                 
               UiApplication.getUiApplication().pushScreen(new ListScreen1());                                                        
           }
    }
    );

2.ListScreen1

class ListScreen1 extends MainScreen 
{
    //
    //
    //
    public ListScreen1()
    {
        ObjectListField lf = new ObjectListField()
        {           
            protected boolean navigationClick(int status, int time)
            {
                return true;
                //HttpRequest
                //push(new ListScreen2) 
            }
        };
                    //httpRequest
                    //addlist
    }
    class ListCallBack implements ListFieldCallback
    {       
       public  void drawListRow(final ListField list, final net.rim.device.api.ui.Graphics g, final int index, final int y, final int w)
       {               
          //                    
       }
       public Object get(ListField list, int index)
       { 
           //return 
       } 
       public int getPreferredWidth(ListField list)
       {
           //return
       }
       public int indexOfList(ListField listField, String prefix, int start) 
       {
          //return 
       }       
    }           
}

3.ListScreen2:

class ListScreen2 extends MainScreen 
{
    //
    //
    //
    public ListScreen2()
    {
        ObjectListField lf = new ObjectListField();
        /httpRequest
                    //addlist
    }
    class ListCallBack implements ListFieldCallback
    {       
       public  void drawListRow(final ListField list, final net.rim.device.api.ui.Graphics g, final int index, final int y, final int w)
       {               
          //                    
       }
       public Object get(ListField list, int index)
       { 
           //return 
       } 
       public int getPreferredWidth(ListField list)
       {
           //return
       }
       public int indexOfList(ListField listField, String prefix, int start) 
       {
          //return 
       }       
    }

How to manage pleasewait between those classes?? pls help

0

There are 0 answers