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?
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?
No... that's really the point of 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
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.
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
Off course the soft buttons are not visible but they are workableCommandListener 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.
Regards,
Saurabh
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
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.
Yup.
Basically, if you have:
Then you need:PHP Code:public void keyPressed(int code) {
switch (code) {
case LEFT_SOFTKEY:
doLeftSoftkeyAction();
break;
case RIGHT_SOFTKEY:
doRightSoftkeyAction();
break;
}
}
Graham.PHP Code:public void paint(Graphics g) {
// paint whatever
// finally, paint the softkey labels
g.drawString(leftSoftkeyLabel, 0, screenHeight, Graphics.BOTTOM | Graphics.LEFT);
g.drawString(rightSoftkeylabel, screenWidth - 1, screenHeight, Graphics.BOTTOM | Graphics.RIGHT);
}
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...
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