×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    8

    how to get the resolution of device in widget?

    Hello everyone i want to get the resolution of device in my widget so is there any way to do this?please help me to do this if any body have any idea about this.

    Thanks
    Kalpesh Tita

  2. #2
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: how to get the resolution of device in widget?

    Hello,

    You can get it by querying screen height and width
    window.screen.height
    window.screen.width

    If you want to get the available area use innerHeight / innerWidth
    window.innerHeight
    window.innerWidth

    -Ilkka

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    8

    Re: how to get the resolution of device in widget?

    Hi isalento

    i tried with this but it give's me the reslution of my desktop not my simulator's so is there any way to get it of i have to check it on devicde only.

    Thanks
    Kalpesh Tita

  4. #4
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: how to get the resolution of device in widget?

    Yes window.screen.* works properly only in a real device. You could create a simple detection script based on screen size for the simulator.
    innerHeight and innerWidth should work in both environments.

    -Ilkka

Similar Threads

  1. Widget not recognized on mobile device
    By t-kev in forum Symbian
    Replies: 2
    Last Post: 2009-04-07, 08:35
  2. How to handle images for diff. resolution device
    By kishore84 in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-05-24, 19:35
  3. mms and device resolution
    By gumgumok in forum General Messaging
    Replies: 0
    Last Post: 2006-11-27, 08:52
  4. How detect device screen resolution during installation?
    By kompotFX in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-05-26, 11:30
  5. Series60 Device Resolution
    By earamsey in forum Mobile Java General
    Replies: 1
    Last Post: 2004-06-08, 06:32

Posting Permissions

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