裝置資訊總覽:Sagem MyX5-2
顯示特性
| 屬性 | 值 | 預處理變數 |
| 螢幕尺寸 | 128x160 | polish.ScreenSize, polish.ScreenWidth, polish.ScreenHeight |
| Canvas 尺寸 | 128x128 | polish.CanvasSize, polish.CanvasWidth, polish.CanvasHeight |
| 全螢幕 Canvas | 128x142 | polish.FullCanvasSize, polish.FullCanvasWidth, polish.FullCanvasHeight |
| 色深 | 16 位 (65,536 色) | polish.BitsPerPixel |
| 觸控筆事件 | 不支援 | polish.hasPointerEvents |
平台規格
| 屬性 | 值 | 預處理變數 |
| 廠商 | Sagem | polish.Vendor |
| 作業系統 | Windows Mobile 2003 | polish.OS |
| Java 平台 | MIDP/2.0, JTWI/1.0 | polish.JavaPlatform, polish.midp2 |
| 配置 | CLDC/1.0 | polish.JavaConfiguration, polish.cldc1.0 |
| 支援 API | mmapi, mmapi1.1, wmapi | polish.JavaPackage, polish.api.mmapi... |
| 符合 Polish GUI 建議規格 | 是 | -- |
記憶體
| 屬性 | 值 | 預處理變數 |
| Heap 大小 | 512 KB | polish.HeapSize |
按鍵映射
| 按鍵 | 鍵值 | 預處理變數 |
| 左軟鍵 | -6 | polish.key.LeftSoftKey |
| 右軟鍵 | -7 | polish.key.RightSoftKey |
資源群組
依解析度、色深、API 分組,資源放置於對應目錄:
midp2, jtwi, mmapi, mmapi1.1, wmapi
ScreenSize.128x160, CanvasSize.128x128, FullCanvasSize.128x142
BitsPerPixel.4+ ~ BitsPerPixel.16
預處理能力值完整清單
polish.bitsperpixel=16
polish.build.bootclasspath=midp-2.0.jar, cldc-1.0.jar
polish.cameraresolution=640x480
polish.camerazoom=4
polish.canvasheight=128
polish.canvassize=128x128
polish.canvaswidth=128
polish.fullcanvasheight=142
polish.fullcanvassize=128x142
polish.fullcanvaswidth=128
polish.heapsize=512 kb
polish.identifier=Sagem/MyX5-2
polish.imageformat=png, gif, gif87, gif89, jpg, jpeg, bmp
polish.javaconfiguration=CLDC/1.0
polish.javapackage=mmapi-1.1, wmapi
polish.javaplatform=MIDP/2.0, JTWI/1.0
polish.key.leftsoftkey=-6
polish.key.rightsoftkey=-7
polish.name=MyX5-2
polish.os=Windows Mobile 2003
polish.screenheight=160
polish.screensize=128x160
polish.screenwidth=128
polish.supportfloatingpoint=false
polish.vendor=Sagem
預處理符號
每個 capability 產生同名符號,可用 //#ifdef 判斷:
//#if polish.api.mmapi || polish.midp2
// 此裝置支援 Mobile Media API
//#endif
完整符號清單包含:polish.api.mmapi, polish.api.mmapi1.1, polish.api.wmapi, polish.bitsperpixel.16, polish.cameraresolution.640x480, polish.canvasheight, polish.canvassize.128x128, polish.cldc1.0, polish.midp2, polish.vendor.sagem 等數十項。
應用指南
- 在
build.xml 以 <requirement name="Identifier" value="Sagem/MyX5-2"/> 針對此裝置建構
- 原始碼中用
//#= int w = ${polish.ScreenWidth}; 注入螢幕寬度常數
- 依
polish.key.LeftSoftKey 等按鍵值處理 UI 導航
- 資源檔置於對應群組目錄,建構時自動打包