BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-29-2008, 08:00 AM   #1
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Default Display a splashscreen

Please Login to Remove!

Hi there,
when the user starts my application, then there is a lot of configuration stuff etc to do.
so i decided to display a splashScreen, so that the user can see, the application is running.

before i start with more and more bla bla i show you what i have done so far, and what my problem is:
PHP Code:
public class OrdnerApp extends UiApplication implements KeyListener,TrackwheelListenerFolderListenerListFieldCallback 
public 
frmSplashScreen SplashScreen;
private 
MainScreen _screen;
 
    public static 
void main(Stringxxx91;xxx93; args) {
       
OrdnerApp app =  new OrdnerApp();
        
app.enterEventDispatcher();
    }
    
       
    private 
OrdnerApp() { 
    
SplashScreen = new frmSplashScreen(_screen);
     
_screen = new MainScreen();
   ....
  
_screen.addKeyListener(this);
        
_screen.addTrackwheelListener(this);
        
        
pushScreen(_screen); 
        
pushScreen(SplashScreen);
               
        
checkConfigEmail();
....
UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());   
}
...

So my problem is the following:
i start my application and i see the BB "desktop" after some seconds i see my application, but the mainform and not my splashscreen.

i think, the problem is, the screen is pushed and popped so fast that i can't see it, and the functions between pushing and popping are executet first and then the screenhandling starts.

i there a chance to push the screen first, then doing the other stuff and when it's done to pop the splashscreen? (hope you got an idea of this what i mean ;))

thanks so far.
hibbert
__________________
My English is so bad, that makes me nobody so quickly after

Last edited by hibbert; 09-29-2008 at 08:02 AM..
Offline  
Old 09-29-2008, 08:45 AM   #2
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

put your checkConfigEmail code in a separate thread and start it at the current code line, so it would not block your constructor and th eapplication will enter the event dispatcher mode.
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 09-29-2008, 08:56 AM   #3
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

remembered an article in RIM's KB:

Livelink - Redirection
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 09-30-2008, 03:18 AM   #4
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Default

hello,
i have tried to put it in a seperate thread, but the problem is still the same.
here are some lines:
PHP Code:
   public static void main(Stringxxx91;xxx93; args) {
       
OrdnerApp app =  new OrdnerApp();
        
app.enterEventDispatcher();
    }
    private class 
OptionThread extends Thread {
        public 
void run() {
        
checkConfigEmail();
        
        try {
            
loadOptions();
           
TimerTask worker = new TimerTask();
            
worker.start(); 
            
UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());   
        
pushScreen(_screen); 
        }
    }
       
    private 
OrdnerApp() { 
    
SplashScreen = new frmSplashScreen();
    
pushScreen(SplashScreen);
    
UiApplication.getUiApplication().updateDisplay();
    
OptionThread _OptionThread = new OptionThread();
   
_OptionThread.start(); 
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


1/4

1/4" Inch Fast Response Electric Air Water Solenoid Valve 12V DC Normally Closed

$10.99



1/4

1/4" Inch Fast Response Electric Air Water Solenoid Valve 12V DC Normally Closed

$15.99



3/4

3/4" Brass Electric Solenoid Valve 12V 12 VDC Volt DC Water Air Gas VITON NC B21

$34.80



1/4

1/4" Electric Solenoid Valve Water Oil Air Gas Welders 110/120 volt AC B20N/V

$24.95



1/8

1/8" Inch Direct Acting Fast Response Electric Air Water Solenoid Valve 12V DC

$15.99



1/2

1/2" 110V 120V AC Brass Electric Solenoid Valve Water Air Gas Viton NC 110VAC

$33.95







Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.