Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Phone/View orientation home screen

    Hello,

    My application is running in background (invisible). Now, the application needs to know whether the user interface is displayed in landscape or portrait mode. This can be done (for instance) this way:
    Code:
    CAknAppUiBase::TAppUiOrientation orientation = iAppUi->Orientation();
    if (CAknAppUiBase::EAppUiOrientationPortrait == orientation) ...
    This works fine, as long some other GUI application is started. But when the homescreen is shown then this does not work, because the homescreen is shown everytime in portrait mode (at least on my test device, the Nokia 5800XM).

    Is there a way to fix this issue, e.g. to detect whether the homescreen is the current view?

    Regards,

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

    Re: Phone/View orientation home screen

    RWsSession::GetFocusWindowGroup can tell you who is focused. Then CApaWindowGroup::AppUid.
    TApaTaskList::FindByPos is also said to get you the foreground app, then it has both WgId (for CApaWindowGroup), and TThreadId (for RThread, RProcess).

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

    Re: Phone/View orientation home screen

    Thanks a lot. Actually my original problem grew, because there are also other application beside the homescreen which use fixed landscape or portrait mode (and the UIDs of the applications can be arbitrary).
    So, is there a chance to get the orientation or dimension of a specific application (in focus), e.g. by its UID?

  4. #4
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Re: Phone/View orientation home screen

    I found the solution which seems to work:
    Code:
    CEikonEnv::Static()->ScreenDevice()->CurrentScreenMode();

  5. #5
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Phone/View orientation home screen

    you can listen for orientation change as mentiond here.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  6. #6
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Phone/View orientation home screen

    One more ways, you can find your phone orientation mode at any time by use CBA locations....It's working fine in all phones:-)

    if(AknLayoutUtils::CbaLocation() == AknLayoutUtils::EAknCbaLocationLeft
    || AknLayoutUtils::CbaLocation() == AknLayoutUtils::EAknCbaLocationRight )
    {
    //Landscape mode
    }
    else
    {
    //Portrait mode.
    }

Similar Threads

  1. How to set or disable Screen orientation for particular view in a project?
    By mail2karthi07 in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2011-01-03, 15:48
  2. Home Screen Mini View
    By kiakeroo in forum Symbian
    Replies: 13
    Last Post: 2009-12-03, 09:29
  3. How to know the orientation of phone screen!
    By manish.agarw in forum Symbian
    Replies: 3
    Last Post: 2009-09-15, 13:47
  4. Widget : Home Screen View
    By neeraja.nokia in forum Symbian
    Replies: 1
    Last Post: 2009-08-31, 14:36
  5. Replies: 0
    Last Post: 2009-04-27, 14:03

Posting Permissions

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