×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    95

    Splash screen issue...

    Hi I have problem displaying splash screen

    The problem is the screen blocks for three seconds showing nothing and then image just flashes for minor sec and goes off.

    I am attaching the code please help..


    // The calling code before starting my AppUi

    StatusPane()->MakeVisible(EFalse);
    CSplashContainer *splash = new (ELeave) CSplashContainer();
    CleanupStack::PushL( splash );
    splash->SetMopParent( this );
    splash->ConstructL(ApplicationRect());cd
    AddToStackL( splash );

    splash->ActivateL();
    splash->DrawNow();
    User::After(3000000);
    RemoveFromStack( splash );
    CleanupStack::PopAndDestroy();
    StatusPane()->MakeVisible(ETrue);




    My CSplashContainer class looks like this..


    oid CSplashContainer::ConstructL(const TRect& aRect)
    {
    CSmartProfileAppUi *appUi = (CSmartProfileAppUi*)iEikonEnv->AppUi();

    CreateWindowL();

    TFileName aSplashMifFileName;

    _LIT(KSplashFilePath, "\\resource\\apps\\MobiSecureSplash.mif");


    TParse parse;
    parse.Set(appUi->Application()->AppFullName(), NULL, NULL);
    aSplashMifFileName.Copy(parse.Drive());
    aSplashMifFileName.Append(KSplashFilePath);



    iSplashBitmap = AknIconUtils::CreateIconL(aSplashMifFileName,EMbmMobiantispamsplashAntispam_1);
    AknIconUtils::SetSize( iSplashBitmap, aRect.Size(),EAspectRatioNotPreserved );


    SetRect(aRect);
    ActivateL();
    }

    // Destructor
    CSplashContainer::~CSplashContainer()
    {
    delete iSplashBitmap;
    }

    // ---------------------------------------------------------
    // CSplashContainer::SizeChanged()
    // Called by framework when the view size is changed
    // ---------------------------------------------------------
    //
    void CSplashContainer::SizeChanged()
    {
    }

    // ---------------------------------------------------------
    // CSplashContainer::CountComponentControls() const
    // ---------------------------------------------------------
    //
    TInt CSplashContainer::CountComponentControls() const
    {
    return 0; // return nbr of controls inside this container
    }

    // ---------------------------------------------------------
    // CSplashContainer::ComponentControl(TInt aIndex) const
    // ---------------------------------------------------------
    //
    CCoeControl* CSplashContainer::ComponentControl(TInt aIndex) const
    {
    switch ( aIndex )
    {
    default:
    return NULL;
    }
    }

    // ---------------------------------------------------------
    // CSplashContainer:raw(const TRect& aRect) const
    // ---------------------------------------------------------
    //
    void CSplashContainer:raw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    gc.BitBlt(TPoint(0, 0), iSplashBitmap);
    }

    // ---------------------------------------------------------
    // CSplashContainer::HandleControlEventL(
    // CCoeControl* aControl,TCoeEvent aEventType)
    // ---------------------------------------------------------
    //
    void CSplashContainer::HandleControlEventL(
    CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
    {
    // TODO: Add your control event handler code here
    }

    TKeyResponse CSplashContainer::OfferKeyEventL(
    const TKeyEvent& aKeyEvent,
    TEventCode aType )
    {
    return EKeyWasNotConsumed;
    }

    void CSplashContainer::MiuoConvertComplete(TInt aError)
    {
    CActiveScheduler::Stop();
    }

    void CSplashContainer::MiuoCreateComplete(TInt aError)
    {

    }

    void CSplashContainer::MiuoOpenComplete(TInt aError)
    {
    CActiveScheduler::Stop();
    }

    // End of File

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Splash screen issue...

    i suggest you profile to see where it is blocking . might be you image loading and resizing

  3. #3
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    95

    Re: Splash screen issue...

    Hi I didnt get what do you mean profiling....

  4. #4
    Regular Contributor
    Join Date
    Aug 2005
    Location
    India
    Posts
    399

    Re: Splash screen issue...

    Try using Active object timers instead of User::After.

Similar Threads

  1. Splash Screen problem
    By damien_a in forum Mobile Java General
    Replies: 2
    Last Post: 2008-03-10, 07:03
  2. Splash Screen
    By Devang Shah in forum Symbian
    Replies: 1
    Last Post: 2005-03-24, 08:04
  3. splash screen
    By klflanagannokia in forum Mobile Java General
    Replies: 1
    Last Post: 2004-03-08, 16:39
  4. how to show a splash screen, then a list?
    By lingtze1 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-08-13, 05:55
  5. splash screen doesnt show??? why?
    By lingtze1 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-06-10, 08:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •