×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    35

    Question Problem with setFullScreenMode(true) in canvas

    Hi guys,
    In my application I have two canvas class named as below.
    Code:
      
      class Abc extends Canvas implements CommandListener{
                //constructor
                public Abc() {
                taskBack = new Command("Back",Command.BACK,1);
                // Some Image accessing code here
                addCommand(taskBack);
                setCommandListener(this);
                setFullScreenMode(true);
            }
      }
      class Xyz extends Canvas implements CommandListener{
                //constructor
                public Xyz() {
                 taskBack = new Command("Back",Command.BACK,1);
                addCommand(taskBack);
                setCommandListener(this);
                setFullScreenMode(true);
         }
      }
    These two classess are declared inside another class from which I control the display.
    It displays the first canvas initially. and After a button press event the second canvas will be displayed.
    Now The problem is: second canvas displayed in fullscreen but the first canvas is not displayed in full screen.
    What is the problem with my code?
    Is there any other idea to display a fullscreen canvas?
    Please help me.
    Thanks.

  2. #2
    Nokia Developer Expert
    Join Date
    May 2007
    Location
    Mexico D.F
    Posts
    351

    Re: Problem with setFullScreenMode(true) in canvas

    Hello

    1. What phone are you using?

    2. Put the
    Code:
    setFullScreenMode(true);
    in the first line and see what happens.
    :Ruben

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    35

    Re: Problem with setFullScreenMode(true) in canvas

    Hi,
    Thanks for your answer. I have tried with it and it gives the same result. I have tested in java wareless toolkit emulator.
    Quote Originally Posted by rdrincon View Post
    Hello

    1. What phone are you using?

    2. Put the
    Code:
    setFullScreenMode(true);
    in the first line and see what happens.
    will the GameCanvas instead of Canvas give me the result?

    thanks in advanced.
    AMin

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: Problem with setFullScreenMode(true) in canvas

    Hi,
    Like rdrincon suggested that is the way for setting the full screen ,mode.As rdrincon ask to you which is/are the targeted devices ..you did not explain..
    Have you test it by putting on device..??

    However you can try these points -
    @ You can check that - instead of the getWidth() and getHeight you can just initialize the width and height of the screen size..
    @ You can use the setFullScreenMode(true); after that above written lines..width and height..
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    35

    Re: Problem with setFullScreenMode(true) in canvas

    Hi,
    sorry for my less specification.
    I have tested in nokia 60 series and sumsung U800
    . I have another issue regarding this.
    That is:
    when I use
    Code:
    graphices.drawImage(image,getWidth(),getHeight(), Graphics.HCENTER|Graphics.VCENTER )
    image just print in the top left conrner in 1/4 area of screen.
    But when I use
    Code:
    graphices.drawImage(image,getWidth(),getHeight(), Graphics.LEFT|Graphics.TOP )
    In Sumsung it prints in total screen but still show the command button in bottom which I add in the canvas.
    And in nokia 60 width is ok. But the height is still about half of the screen.
    But I want to show the image in full screen wish covers the total area including the area of the command button. and I am using the setFullScreenMode(true) in constructor of canvas class.
    I hope this represent my problem.
    Please help me.



    Quote Originally Posted by raj_J2ME View Post
    Hi,
    Like rdrincon suggested that is the way for setting the full screen ,mode.As rdrincon ask to you which is/are the targeted devices ..you did not explain..
    Have you test it by putting on device..??

    However you can try these points -
    @ You can check that - instead of the getWidth() and getHeight you can just initialize the width and height of the screen size..
    @ You can use the setFullScreenMode(true); after that above written lines..width and height..
    Thanks,

  6. #6
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Problem with setFullScreenMode(true) in canvas

    u are taking into account the screen sizes and the image size right ?
    As in if it only covers part of the screen it might be that the Image u are drawing is smaller than the screen sizes... J2ME wont strecht/fit the image for u !!!
    In that case on one phone it might cover the whole screen (a lower resolution) whilst on another it will cover only part (higher resolution)...
    to test it instead of drawing an image u could draw a solid rectangle, always using the TOP | LEFT and getWidth() getHeight() parameters...

  7. #7
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: Problem with setFullScreenMode(true) in canvas

    Hi,
    Well the anchor settings can vary from device to device...
    If that image is coming in the half of the screen then you can just try the other anchor...

    @ IS the size of the image is equal to the size of the size of screen..??
    @ If yes then just set the full screen mode true..or just try to putting the screen width and height as the hard code values..
    @ then just draw the image like
    g.drawImage(0,0,0);

    I am sure it can help you,
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Problem MMC+USB Connection
    By Fede81 in forum Symbian
    Replies: 1
    Last Post: 2007-06-14, 06:13
  2. Problem viewing text in canvas
    By erracid8 in forum Mobile Java General
    Replies: 2
    Last Post: 2007-06-12, 09:10
  3. Problem MMC+USB Connection
    By Fede81 in forum General Development Questions
    Replies: 3
    Last Post: 2006-07-19, 15:21
  4. full canvas problem
    By SolaSoly in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2003-03-28, 03:29
  5. Problem with Image loading for Canvas
    By rsantossio in forum Mobile Java General
    Replies: 2
    Last Post: 2003-02-28, 00:24

Posting Permissions

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