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



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


MITSUBISHI FR-A820 1.5K TFA INVERTER A500 240 V #L-220 picture

MITSUBISHI FR-A820 1.5K TFA INVERTER A500 240 V #L-220

$684.00



1PC USED A54MA30B Mitsubishi F500/A500/A540 Series 30-37KW Mainboard #CZ picture

1PC USED A54MA30B Mitsubishi F500/A500/A540 Series 30-37KW Mainboard #CZ

$228.00



Mitsubishi FR-A540-0.75K-NA AC DRIVE INVERTER 1 HP 380-480 VAC 50/60 HZ 4.1 AMP  picture

Mitsubishi FR-A540-0.75K-NA AC DRIVE INVERTER 1 HP 380-480 VAC 50/60 HZ 4.1 AMP

$649.99



1PC USED A54MA55B BC186A413G52 Mitsubishi A500/F540 Series 55KW Drive Board #CZ picture

1PC USED A54MA55B BC186A413G52 Mitsubishi A500/F540 Series 55KW Drive Board #CZ

$317.00



1Pcs USED A500 7.5KW 380V FR-A540-7.5K-CH frequency converter picture

1Pcs USED A500 7.5KW 380V FR-A540-7.5K-CH frequency converter

$401.02



1PC USED A54MA30B Mitsubishi F500/A500/A540 Series 30-37KW Drive Main Board #CZ picture

1PC USED A54MA30B Mitsubishi F500/A500/A540 Series 30-37KW Drive Main Board #CZ

$255.00







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