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


Jelenko Commodore LS VPF with Pump  picture

Jelenko Commodore LS VPF with Pump

$875.00



Vintage Printer Switch box Commodore 64/Sanyo Mountable Computer PC picture

Vintage Printer Switch box Commodore 64/Sanyo Mountable Computer PC

$49.00



Vintage MOS 8502 8502R0 Commodore C64 very rare good condition x 1pc picture

Vintage MOS 8502 8502R0 Commodore C64 very rare good condition x 1pc

$22.00



6500/1 A 6502 VARIENT CPU COMMODORE USE IN AMIGA KB & 1520 PLOTTER NMOS NCR NOS picture

6500/1 A 6502 VARIENT CPU COMMODORE USE IN AMIGA KB & 1520 PLOTTER NMOS NCR NOS

$5.89



To Suit Holden Commodore 3 Button Car Remote Case/Shell Uncut Key VS VX VY VZ WH picture

To Suit Holden Commodore 3 Button Car Remote Case/Shell Uncut Key VS VX VY VZ WH

$11.99



Windsor Commodore Duo 20

Windsor Commodore Duo 20" Carpet extractor w/Lester Charger 25900/Battery/99hour

$2799.99







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