×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    292

    How to know the orientation of phone screen!

    Hi Guys :

    I want to know the orientation of screen i.e portrait aur landscape....

    i have used Orientation();API it returns automatic orientation.....so i am not able to figure out the exact one...


    Second, i want to know that on N97 mobile how do i figure out that keyboard is in focusable mode...i.e we flip the phone and slide also....


    Regards
    Manish

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: How to know the orientation of phone screen!

    HandleScreenDeviceChangedL() would do your solution i think.

    HandleScreenDeviceChangedL() will be called by the system when the screen mode changes. To check which mode it is in (Flip open or Flip closed), put the following code in your implementation:

    CWsScreenDevice& screenDevice = *(iCoeEnv->ScreenDevice());
    TBool isFlipOpen = (screenDevice.CurrentScreenMode() == 0) ?
    ETrue : EFalse;

    Finally, you have to make sure that the window server notifies your application when the screen mode changes. To do that, you have to add the following to your ConstructL() method:

    RWindowGroup& rootWinGroup = iCoeEnv->RootWin();
    rootWinGroup.EnableScreenChangeEvents();
    Regards,
    Shafali

  3. #3
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: How to know the orientation of phone screen!

    Also check following solution - Listening for screen orientation changes

  4. #4
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    292

    Re: How to know the orientation of phone screen!

    Hi Thanks a lot ,

    with the help of this i am able to figure out the screen .....

    but second problem is still persist...i.e how do i know that keyboard is in focus in N97 mobile .????

Similar Threads

  1. Testing screen orientation switching using RDA
    By briansmith in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 1
    Last Post: 2009-02-12, 17:31
  2. Nokia Gamer (GamR) - concept phone
    By tgm91 in forum General Development Questions
    Replies: 4
    Last Post: 2008-10-01, 21:34
  3. The Nokia 9210i is the shittiest nokia phone ever!
    By awyeah in forum General Development Questions
    Replies: 2
    Last Post: 2007-10-18, 10:31
  4. JAD attributes on the phone screen
    By tlindstr in forum Mobile Java General
    Replies: 1
    Last Post: 2003-02-24, 10:39

Posting Permissions

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