×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    353

    showing commands on Canvas in full screen mode

    When I switch to Canvas full screen mode, the commands don't show on screen.
    Is it possible to show commands in full screen mode?

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: showing commands on Canvas in full screen mode

    No... that's really the point of full screen mode.

  3. #3
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: showing commands on Canvas in full screen mode

    but if you had set the commandlistener then if the app is in full screen mode it will act accordingly as it to do so in non full screen mode
    Regards,
    Saurabh

  4. #4
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    353

    Re: showing commands on Canvas in full screen mode

    Quote Originally Posted by ingsaurabh View Post
    but if you had set the commandlistener then if the app is in full screen mode it will act accordingly as it to do so in non full screen mode
    CommandListener is implemented. Yet commands not visible.
    As Graham says, probably that's the whole purpose for Full Screen Mode, not to show any clutter on the screen.
    But it would have be nice for the commands bar to be hidden and then pop-up by using some relevant key.

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

    Re: showing commands on Canvas in full screen mode

    the problem with such an implementation though is that it would suit your needs but it most probably won't suit the needs of other developers and may even be considered as annoying or whatever...
    But as mentioned that's the purpose of the FullScreen, but fortunately it's a Canvas, so you can make your own Buttons which btw can look waaaay better than the standard stuff...
    Otherwise you could try some 3rd party gui libraries like LWUIT and J2MEPolish

  6. #6
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: showing commands on Canvas in full screen mode

    CommandListener is implemented. Yet commands not visible.
    As Graham says, probably that's the whole purpose for Full Screen Mode, not to show any clutter on the screen.
    But it would have be nice for the commands bar to be hidden and then pop-up by using some relevant key.
    Off course the soft buttons are not visible but they are workable
    Regards,
    Saurabh

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

    Re: showing commands on Canvas in full screen mode

    Quote Originally Posted by KevinBoyd View Post
    When I switch to Canvas full screen mode, the commands don't show on screen.
    Is it possible to show commands in full screen mode?
    Yes, in full screen mode on Canvas commands are not visible but they work. So just need to draw your own Command bar/buttons match to your full Canvas look and feel.

    thanks,
    ~Amitabh
    Follow me on my blog for Innovative Mobile Apps

  8. #8
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: showing commands on Canvas in full screen mode

    Quote Originally Posted by im2amit View Post
    Yes, in full screen mode on Canvas commands are not visible but they work. So just need to draw your own Command bar/buttons match to your full Canvas look and feel
    Don't use Commands on a fullscreen Canvas. There is a small number of devices (mostly older MIDP-1 devices, so you wouldn't be fullscreen anyway) that don't produce keyPressed() events for softkeys, where Commands must be used. For the vast majority of devices, use keyPressed() events. There are several reasons.

    1. Different devices will assign Commands to keys differently. You can't determine this placement strategy at run-time, so you won't know where to draw the softkey labels. Getting something working right on your phone is highly likely to break on other phones.

    2. Some devices will start displaying a softkey bar as soon as Commands are added, even in fullscreen mode. There is no strict definition of what "fullscreen" has to include, and it certainly doesn't always mean "the full screen" literally. Really, it just means "at least as much screen as non-fullscreen, maybe more".

    3. You may want the option of using a Nokia FullCanvas as a fallback if you have problems on some devices, and this does not support Commands.

    The downside to keyPressed() is that softkeys don't have standard codes, so there is a portability issue. It is an easy problem to work around, but not without supplying multiple JAD/JAR pairs (or having some messy manual key configuration for the user). However, these are easier problems to handle than the problems of using Commands in fullscreen mode.

    If you really want to support the maximum number of devices from a single JAD/JAR pair, then use Commands, but use them in non-fullscreen mode. Don't mix Commands with fullscreen and keyPressed().

    Graham.

  9. #9
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    353

    Re: showing commands on Canvas in full screen mode

    Quote Originally Posted by grahamhughes View Post
    Don't use Commands on a fullscreen Canvas. There is a small number of devices (mostly older MIDP-1 devices, so you wouldn't be fullscreen anyway) that don't produce keyPressed() events for softkeys, where Commands must be used. For the vast majority of devices, use keyPressed() events.
    Graham.
    If I do use keyPressed() events I would have to draw the command strings on the screen right?
    or make some sort of bar mapping the soft keys to the relevant function?
    Last edited by KevinBoyd; 2009-09-10 at 15:28. Reason: grammer

  10. #10
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: showing commands on Canvas in full screen mode

    Yup.

    Basically, if you have:

    PHP Code:
    public void keyPressed(int code) {
        switch (
    code) {
        case 
    LEFT_SOFTKEY:
            
    doLeftSoftkeyAction();
            break;
        case 
    RIGHT_SOFTKEY:
            
    doRightSoftkeyAction();
            break;
        }

    Then you need:

    PHP Code:
    public void paint(Graphics g) {
        
    // paint whatever

        // finally, paint the softkey labels
        
    g.drawString(leftSoftkeyLabel0screenHeightGraphics.BOTTOM Graphics.LEFT);
        
    g.drawString(rightSoftkeylabelscreenWidth 1screenHeightGraphics.BOTTOM Graphics.RIGHT);

    Graham.

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

    Re: showing commands on Canvas in full screen mode

    or, if you'd like to create somewhat appealing buttons, you could write the text on like a filled rectangle or instead use some Images...

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

    Re: showing commands on Canvas in full screen mode

    You can see a example of FullCanvas Menu implementation on FN wiki:
    http://wiki.forum.nokia.com/index.ph...Menu_on_Canvas
    It draws Softkeys in the footer on the full Canvas.

    thanks,
    ~Amitabh
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Replies: 1
    Last Post: 2007-09-07, 14:18
  2. How to change screen mode / resolution on S60 3rd edition devices?
    By mriekert in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-01-03, 09:31
  3. UI: Full Screen Mode
    By GENERAL_INFO in forum Symbian User Interface
    Replies: 3
    Last Post: 2004-11-22, 06:27
  4. Full canvas problem in Nokia 7650
    By chandanp in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2002-10-01, 15:00
  5. Problem using Full Canvas
    By chandanp in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2002-08-30, 04:49

Posting Permissions

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