-------------------page 203--------------------------------
|How to Apply the J2ME Polish GUI for Existing Applications |
-----------------------------------------------------------
If an existing application should be “polished up” you should insert #style preprocessing directives within the application to allow a fine grained design.
//#style mainScreen
List mainScreen = new List( "Main Menu", List.IMPLICIT );
//#style mainScreenItem
mainScreen.append( "Start Game", null );
You then need to use static styles in the “polish.css” file.
Static styles can have almost any alphanumerical name and need to start with a dot:
.mainScreen {
padding: 5;
background-color: yellow;
columns: 2;
columns-width: 40, 100;
}
In the last step you should refine your designs by adjusting them for different handsets. If you want to make adjustments for the SonyEricsson P900 for example, you need to create the file “resources/SonyEricsson/P900/polish.css”. In this file you can change any settings which you have done in the basic “resources/polish.css” file.
Remember that you only need to specify attributes which are different, this makes subsequent changes easier.
Find more information on designing for specific devices on page 112.
|How to Apply the J2ME Polish GUI for Existing Applications |
-----------------------------------------------------------
If an existing application should be “polished up” you should insert #style preprocessing directives within the application to allow a fine grained design.
//#style mainScreen
List mainScreen = new List( "Main Menu", List.IMPLICIT );
//#style mainScreenItem
mainScreen.append( "Start Game", null );
You then need to use static styles in the “polish.css” file.
Static styles can have almost any alphanumerical name and need to start with a dot:
.mainScreen {
padding: 5;
background-color: yellow;
columns: 2;
columns-width: 40, 100;
}
In the last step you should refine your designs by adjusting them for different handsets. If you want to make adjustments for the SonyEricsson P900 for example, you need to create the file “resources/SonyEricsson/P900/polish.css”. In this file you can change any settings which you have done in the basic “resources/polish.css” file.
Remember that you only need to specify attributes which are different, this makes subsequent changes easier.
Find more information on designing for specific devices on page 112.
本文介绍如何使用J2ME Polish GUI对现有应用程序进行优化。通过在应用中插入样式预处理指令并定义静态样式,可以实现精细的设计调整。此外,还介绍了如何针对特定设备如Sony Ericsson P900进行定制化设计。
1544

被折叠的 条评论
为什么被折叠?



