Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User dinesh547's Avatar
    Join Date
    Nov 2007
    Posts
    384
    Hi all,
    I need to develop a splash screen for my application until some of the file reading is not completed in my application. i created my splash screen with a image and tried to call the file reading code in constructL function of the container after ActivateL() function. But problem is that while file reading is in progress it doesn't show the splash screen. I want that my splash screen will get acitivated as application starts and deactivated when all file reading is done. Can anybody tell me where i should put the file reading function in the splashcontainer so that the file reading will only get started after splash screen displays..

    Thanks in advance.

  2. #2
    Nokia Developer Champion not_dying's Avatar
    Join Date
    Feb 2009
    Location
    India
    Posts
    813
    See, first of all you might be having one AppUi class which should be derived from CAknViewAppUi API. Then you might be having another view class as Splash screen. So, from AppUi's constructl() you should set your default view as Spalsh screen view. Then from Splash Screen Container's CnstructL(), start reading file contents. When you get the event of reading completion then activate some other view and hence Splash Screen container will not be activated.

  3. #3
    Registered User dinesh547's Avatar
    Join Date
    Nov 2007
    Posts
    384
    Quote Originally Posted by not_dying View Post
    See, first of all you might be having one AppUi class which should be derived from CAknViewAppUi API. Then you might be having another view class as Splash screen. So, from AppUi's constructl() you should set your default view as Splash screen view. Then from Splash Screen Container's ConstructL(), start reading file contents. When you get the event of reading completion then activate some other view and hence Splash Screen container will not be activated.
    Hi Not Dying,
    I have done the same thing . But after container constructL it takes some time for the splash screen to visible on the screen. so before showing the splash screen my application starts reading the file & shows a blank screen instead of the splash screen.

    Any More help..?

  4. #4
    Nokia Developer Champion not_dying's Avatar
    Join Date
    Feb 2009
    Location
    India
    Posts
    813
    I forgot to mention in my last post that in one of my project, i am also doing the same stuff. But the flow is: In AppUi's ConstructL(), read the file's contents first then set splash screen as default view. But meanwhile I don't get any black screen as per in your case.

  5. #5
    Registered User dinesh547's Avatar
    Join Date
    Nov 2007
    Posts
    384
    Quote Originally Posted by not_dying View Post
    I forgot to mention in my last post that in one of my project, i am also doing the same stuff. But the flow is: In AppUi's ConstructL(), read the file's contents first then set splash screen as default view. But meanwhile I don't get any black screen as per in your case.
    When we set a view as defualt in Appui. It always takes some little time.(becuase draw is called asyncronously) there is always some delay in contructL activateL call
    and containers draw call. Further drawing may be delayed due to the some complex drawing in draw function itself. So expecting that setDefault will immediately draw on screen is wrong. May be in ur case the file size is less or very small. and somehow splash screen get shown immediately. But it was not happening in my case.

    I used a diffrent approach. I created a periodic timer and checked every second that my view is in foreground or not using view->IsForeground() if it is true than it is sure that my splash screen is visible currently and i started my file reading after splash screen got visible. This solves my problem :)

  6. #6
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    Note that you could also call the AppUI class from any view, thus you could tell from the view whether it is constructed and ok to go..

  7. #7
    Registered User dinesh547's Avatar
    Join Date
    Nov 2007
    Posts
    384
    Quote Originally Posted by symbianyucca View Post
    Note that you could also call the AppUI class from any view, thus you could tell from the view whether it is constructed and ok to go..
    hi yucca, i tried the same thing too . but i was not able to find when exactly my view will be visible or what function get called after view get visisble there Please let us know if there is functions which get called after view is visible. DoACtivate is not at least 1 of them as it is too asyncronous and doesnt guaartee that view is visible or not..

  8. #8
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    in DoActive you would costruct the CCoeControl based container, which would be drawn rather immidiately, thus I would not see the problem that it wouldn't draw fast enough.

  9. #9
    Registered User dinesh547's Avatar
    Join Date
    Nov 2007
    Posts
    384
    unfortunately it was not working for me. The view became visible after a little time and before showing the view it start reading my file. and as per i observe draw function get called after doactive function completes..

  10. #10
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    in general yes, basically you construct the CCoeControl based container, and then there will be a draw event issued, then depending on what is being done in your program, the draw event could be delivered a bit after. Anyway, that behaviour has nothing to do with views, it is about active scheduler scheduling events.

Similar Threads

  1. Splash screen issue...
    By chintandhruva in forum Symbian C++
    Replies: 3
    Last Post: 2009-11-13, 10:54
  2. Displaying the next screen after splash screen
    By rachelwiz in forum Mobile Java General
    Replies: 8
    Last Post: 2009-08-24, 17:49
  3. Splash Screen issue for S60 5th edition mobile
    By sreekanth288 in forum Mobile Java General
    Replies: 9
    Last Post: 2009-03-21, 11:34
  4. splash screen
    By mayankkodesia in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-10-10, 15:14
  5. Full screen splash screen
    By jitendrachhajed in forum Symbian C++
    Replies: 1
    Last Post: 2005-07-11, 08:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved