Header Sep
Java Tips, Tricks & Code
我的评分 用户评价
登录票选本页
September 2004
Working with full screen Canvas Commands on the P910 series
 

[Back]

The implementation of MIDP 2.0's full-screen canvas method on Sony Ericsson P910 series of smartphones creates some issues that developers have to deal with in order to take full advantage of the feature.

On phones such as the K500 series and the K700 series, the soft buttons on the screen in the full-screen mode are always accessible from the real buttons on the keypad, even though the soft buttons are not displayed. Pressing a keyboard button in full-screen mode displays a menu with the soft buttons' labels, allowing the user to make a choice.

However, on the P910 series things work differently. The equivalents of soft buttons are instead menu items placed in a drop down menu. You access this menu by tapping the stylus on the screen's top menu bar. More to the point, the keyboard buttons can't be used to access the menu. And this is exactly what a developer needs to know. When operating in full-screen mode the whole menu disappears and there is no way to access the menu items.

What this means is that in full-screen mode, the developer is responsible for creating a way for the user to access the functions offered by the menu items. This can be done in many ways, but the most straightforward is to write code that creates and displays custom buttons and then checks if the buttons are tapped by the stylus.

The downloadable P910 Full Screen example does just that. It's a very simple MIDlet that shows a canvas that can be switched between standard mode and full-screen mode. When in full-screen mode, on-screen buttons created and managed by custom code are used instead of the menu.

Download FullScreenP910.zip>>

 


 
我的评分 用户评价
登录票选本页