How to Apply the J2ME Polish GUI for Existing Applications

本文介绍如何使用J2ME Polish GUI对现有应用程序进行优化设计。通过插入样式预处理指令并定义静态样式来实现定制化的界面表现。此外,还介绍了针对特定设备调整设计的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

-------------------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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值