×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    5

    How to disable the screen orientation feature to the midlet canvas?

    I have created a midlet app which has a form and canvas screens. I want to disable the screen orientation feature only to the canvas, if I use Nokia-MIDlet-App-Orientation property in jad file, it is also disabling the orientation feature to the form .

    can you please help me How can I disable it only to the Canvas? not application level.

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: How to disable the screen orientation feature to the midlet canvas?

    Hello vemulakiran,

    unfortunately there is no alternatives for this, MIDlet's whole orientation will be determined based on the value of the orientation attribute.

    Could you tell more about your use case, why do you want to have different orientation for high-level UI and low-level UI?

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: How to disable the screen orientation feature to the midlet canvas?

    can you please help me How can I disable it only to the Canvas? not application level.
    When this happens, you get a callback in your Canvas in sizeChanged(int ht, int wd); method and then repaint() is called.

    You will need to put in your logic here.

    Trick--> What all you want to display on the application canvas on its default orientation, keep on painting to a mutable image object and then paint this on the canvas on every repaint(), when orientation changes - sizeChanged() is called - rotate the image by 90degree and repaint() thus the change in orientation will not look effective to the enduser.

    thanks,
    ~Amitabh

Similar Threads

  1. adding SCREEN command to canvas clas
    By apnasi in forum Mobile Java General
    Replies: 1
    Last Post: 2010-04-19, 08:26
  2. Full screen support for touch enabled MIDlet
    By forceoflight in forum Mobile Java General
    Replies: 6
    Last Post: 2009-12-14, 08:53
  3. N97: How to detect when the screen orientation changes?
    By shockreaction in forum Mobile Java General
    Replies: 3
    Last Post: 2009-07-13, 11:47
  4. 5800 and Screen Orientation
    By gpaes in forum Mobile Java General
    Replies: 0
    Last Post: 2009-06-15, 19:52
  5. Canvas versus MIDlet
    By docaoimh in forum Mobile Java General
    Replies: 0
    Last Post: 2004-07-14, 14:20

Posting Permissions

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