×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    18

    Image not displayed in landscape mode

    Hi , i have created a program that displays image, it is working right in normal mode, but not displayed when i change the device in landscape mode. is there any method that indicate the orientation mode so that i can set the coordinates for the image and text dynamically?


    Thanks

    Regards:

    Zulfiqar

  2. #2
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: Image not displayed in landscape mode

    Well, it depends. Turning the device results in a redraw event. If you have the prob when you turn the device, are you sure you have the redraw callback properly set up? Something like

    canvas = appuifw.Canvas(event_callback=e_callback, redraw_callback=draw_screen)

    If this is not the prob, perhaps you are trying to copy an image of a different size to another image?

  3. #3
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: Image not displayed in landscape mode

    The below code is useful to change the orientation in python.


    Code:
    import appuifw
     
     
    appuifw.app.orientation = 'landscape'
    Best regards,

  4. #4
    Registered User
    Join Date
    Apr 2010
    Posts
    18

    Re: Image not displayed in landscape mode

    Thanks rahulvala, but i need a method to get the orientation, i don't want to set it myself. if i print appuifw.app.orientation ,it prints
    automatic,although it is in landscape mode. is there any method to get orientation?

    Regards:
    Zulfiqar
    Last edited by zulfiqarchandio; 2010-06-14 at 10:05.

  5. #5
    Registered User
    Join Date
    Apr 2010
    Posts
    18

    Re: Image not displayed in landscape mode

    Thanks mitts, But i am not using Canvas to draw image, i am using TopWindow to draw image.
    According to you how to copy image? copy image means i made images for different resolution and picking up with the current resolution at runtime.
    Regards:
    Zulfiqar
    Last edited by zulfiqarchandio; 2010-06-14 at 11:44.

  6. #6
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: Image not displayed in landscape mode

    Quote Originally Posted by zulfiqarchandio View Post
    Thanks rahulvala, but i need a method to get the orientation, i don't want to set it myself. if i print appuifw.app.orientation ,it prints
    automatic,although it is in landscape mode. is there any method to get orientation?

    Regards:
    Zulfiqar
    Ya, there is code in the wiki in the symbian C++, which display the current orientation of your phone,

    http://wiki.forum.nokia.com/index.ph...nt_Orientation

    Best regards,

  7. #7
    Registered User
    Join Date
    Apr 2010
    Posts
    18

    Re: Image not displayed in landscape mode

    Thanks Rahulvala, but i want python code. Can u give me the link for python.

  8. #8
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: Image not displayed in landscape mode

    Well, simplest way to get orientation is tho check screen size in the redraw event callback. If w > h, then landscape, if h > w, then portrait. Haven't tried it, but I guess you could have two topwindows, one for each format and display the correct one?

  9. #9
    Registered User
    Join Date
    Apr 2010
    Posts
    18

    Re: Image not displayed in landscape mode

    Thanks mitts. now its fine.

Similar Threads

  1. GameCanvas Landscape-Mode
    By nikolaus11 in forum Mobile Java General
    Replies: 2
    Last Post: 2009-01-21, 04:46
  2. Replies: 0
    Last Post: 2008-11-07, 21:18
  3. Grid text not displayed when switched to landscape mode.
    By praveena_R in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-11-04, 19:04
  4. Skinning in landscape mode.
    By ravinder007 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2007-01-11, 10:24
  5. landscape mode
    By vishwas_vincy11 in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-12-07, 02:54

Posting Permissions

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