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


Johnson Controls MS-VMA1630-1 VMA ProgrammableVAV Box Controller picture

Johnson Controls MS-VMA1630-1 VMA ProgrammableVAV Box Controller

$209.00



Johnson Controls - A19ABB-2C Line Volt Mechanical Tstat picture

Johnson Controls - A19ABB-2C Line Volt Mechanical Tstat

$115.00



Johnson Controls M300RJ Addressable Relay Control Module for Fire Alarms picture

Johnson Controls M300RJ Addressable Relay Control Module for Fire Alarms

$45.00



York Johnson Controls SE-SPU1012-6 5584429 25-2899-94 S1-03103031000 HVAC Board picture

York Johnson Controls SE-SPU1012-6 5584429 25-2899-94 S1-03103031000 HVAC Board

$143.99



Johnson Controls P32AC-2C Sensitive Differential Pressure Switch NIB New picture

Johnson Controls P32AC-2C Sensitive Differential Pressure Switch NIB New

$39.99



New In Box JOHNSON CONTROLS F61KB-11C Water Flow Switch picture

New In Box JOHNSON CONTROLS F61KB-11C Water Flow Switch

$74.51







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