gpt4 book ai didi

java - 在 J2ME Polish 配置图标的大小

转载 作者:行者123 更新时间:2023-11-29 09:11:34 25 4
gpt4 key购买 nike

如何配置图标的大小以正确适应多个移动设备?

基于J2ME Polish documentation ,我正在使用以下 resources 文件夹结构:

IconSize.15x15\icon.png
IconSize.16x16\icon.png
...

但它不起作用,我已经在多个移动设备上进行了尝试,它们都加载了默认的 J2ME 波兰语图标。

这是我的 build.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<project name="myProject" default="j2mepolish">
<property name="polish.home" location="C:\Program Files (x86)\J2ME-Polish" />
<property name="wtk.home" location="C:\JavaME_SDK" />
<taskdef
name="j2mepolish"
classname="de.enough.polish.ant.PolishTask"
classpath="${polish.home}/lib/enough-j2mepolish-build.jar"
/>
<target name="run">
<j2mepolish>
<info
name="My Project"
version="1.0.0"
description="My Project"
vendorName="Diogo"
jarName="myProject.jar"
/>
<deviceRequirements>
<requirement name="Term" value="polish.api.wmapi" />
<requirement name="Identifier" value="Generic/AnyPhone" />
</deviceRequirements>
<build
usePolishGui="true">
<libraries>
<library file="lib/json-1.0.jar" />
</libraries>
<midlet class="myProject" />
<resources
dir="resources/"
defaultexcludes="yes"
excludes="readme.txt" >
<root dir="resources/" includeSubDirs="true" includeBaseDir="true" />
</resources>
<variables>
<variable name="polish.usePolishTitle" value="true" />
<variable name="polish.TextField.suppressCommands" value="true" />
<variable name="polish.TextField.useDirectInput" value="true" />
<variable name="polish.TextField.showInputInfo" value="false" />
</variables>
<obfuscator name="ProGuard"></obfuscator>
<postcompiler name="java5" />
</build>
<emulator />
</j2mepolish>
</target>
<target name="clean">
<delete dir="build" />
<delete dir="dist" />
</target>
</project>

最佳答案

Java ME 应用程序图标在 Jad 和 Manifest 键上定义。它通常在 MIDlet-IconMIDlet-1 的第二个值中显示。查看关于它的其他问题 add icon to j2me application .另请参阅有关图标大小的其他问题 Is there a standard icon size and color depth for J2ME? .

在您提供的链接上 http://www.enough.de/products/j2me-polish/documentation/building/resource-handling/resource-assembling.html有这样的文字:“您可以使用 IconSize.0x0 为具有未知 IconSize 功能的设备存储图标资源”

根据我个人使用图标的经验(而非抛光),我建议您在此文件夹中添加 32x32 png 图标图像。

关于java - 在 J2ME Polish 配置图标的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12091331/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com