0

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

Community
  • 1
  • 1
DevBB
  • 35
  • 5
  • Check this, http://stackoverflow.com/questions/1969114/blackberry-waiting-screen/1969727#1969727. Search on this site before asking question. – Rupak May 23 '12 at 08:09
  • Actualy m doing it in navingation of screens.On both the screens i have listfields. How to do in this case? – DevBB May 23 '12 at 09:32
  • I this http://stackoverflow.com/questions/1503313/blackberry-application-loading-screen is an exact duplicate of your question. Read all the answers. – Rupak May 23 '12 at 09:36
  • Please review the code and help me – DevBB May 23 '12 at 10:33
  • I didn't check your code. If you have time, check this code, https://gist.github.com/2774844. It is a simple application which consist of 3 screen. First screen contains only a button. Clicking on the button will show a Splash screen. When the Splash screen object created, it start a thread which is responsible for loading job. And after the loading job finished, the Splash Screen gets closed, and Another screen appears. I think it will help you. – Rupak May 23 '12 at 12:04

0 Answers0