| ID | TSJ000637 | Creation date | May 10, 2007 |
| Platform | S60 2nd Edition and FP1, FP2, FP3 S60 3rd Edition and FP1 | Devices | |
| Category | Java | Subcategory | MIDP1.0/2.0 |
| Keywords (APIs, classes, methods, functions): |
Changing the Canvas to full-screen mode on S60 devices
Canvas contains a method to set the Canvas to be shown in full-screen mode. The method call is <canvas object name>.setFullScreenMode(true).
On S60 phones the setFullScreenMode(true) does not set the screen to full screen immediately. If the MIDlet calls getGraphics() right after calling the setFullScreenMode() method, it will have the wrong height. Similarly an incorrect height will be returned if the getHeight() method is called immediately after setting the Canvas to full screen.
One possible solution is to call the setFullScreenMode() method, start a new thread from the showNotify() method, and then in the run() method call getGraphics() or getHeight() and start the application.
No related wiki articles found