×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    2

    Please help, about screen orientation change

    As we know, if we override the function HandleStatusPaneSizeChange of AppUi, we can get the notification of orientation change in GUI application. But how to get the notification in an non GUI application?

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Please help, about screen orientation change

    In fact the "authentic" way is watching for KEikDynamicLayoutVariantSwitch in CCoeControl::HandleResourceChangeL (http://wiki.forum.nokia.com/index.ph...yout_switching) in a GUI-app.
    However note that most HandleXy method is invoked after some RWsSession event happens, so if you simply log RWsSession events, it may happen that you can identify which is about orientation change.

  3. #3
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Please help, about screen orientation change

    hi

    please refer this post.

    http://discussion.forum.nokia.com/fo...d.php?t=141520

    savaj..

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Please help, about screen orientation change

    Thank you Savaj, I also remembered that thread, just could not find it :-S

  5. #5
    Registered User
    Join Date
    Aug 2008
    Posts
    2

    Re: Please help, about screen orientation change

    Quote Originally Posted by savaj View Post
    Thanx very much for your reply. Now I can get the notification of screen change in non gui exe. But how can I get the position of the CBA. In GUI application, we can get the position of CBA by
    calling AknLayoutUtils::CbaLocation(). But I tried it in non gui exe, it doesn't work.

  6. #6
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Please help, about screen orientation change

    hi

    you can try something like this,


    TInt mode = iWsScreenDevice->CurrentScreenMode();
    TPixelsTwipsAndRotation PixelsTwipsAndRotation;
    iWsScreenDevice->GetScreenModeSizeAndRotation(mode, PixelsTwipsAndRotation);
    TSize size = PixelsTwipsAndRotation.iPixelSize;

    switch(PixelsTwipsAndRotation.iRotation)
    {
    case CFbsBitGc::EGraphicsOrientationNormal:
    iScreenMode.iCBALocation = ECBALocationBottom;
    break;

    case CFbsBitGc::EGraphicsOrientationRotated180:
    iScreenMode.iCBALocation = ECBALocationTop;
    break;

    case CFbsBitGc::EGraphicsOrientationRotated90:
    iScreenMode.iCBALocation = ECBALocationRight;
    break;

    case CFbsBitGc::EGraphicsOrientationRotated270:
    iScreenMode.iCBALocation = ECBALocationLeft;
    break;
    }

    its working fine for N95 but not tested on N95 8GB.


    savaj...

Similar Threads

  1. How to get notification on change in Orientation.
    By savaj in forum Symbian User Interface
    Replies: 5
    Last Post: 2008-08-20, 13:55
  2. [announce] Google Directions via PyS60
    By neil.young in forum Symbian
    Replies: 29
    Last Post: 2008-02-15, 10:55
  3. Change screen size
    By j2me@com in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2007-08-14, 03:19
  4. Can change screen size of Noia 6280
    By moose^ in forum General Development Questions
    Replies: 0
    Last Post: 2006-09-12, 09:39
  5. how to change Screen from Form to FullCanvas
    By ihadreampp in forum Mobile Java General
    Replies: 3
    Last Post: 2003-08-15, 08:50

Posting Permissions

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