如何创建连续包含图像和多行文本的ListField -- blackberry
我想创建 ListField 。在字段的每一行中,我想在右侧显示图像,在左侧显示文本。我正在使用 ListField 和回调。文本和图像正在显示,但文本被覆盖在图像上,并且如果我更改顺序,即左侧的图像和右侧的文本,那么文本将被截断,并且只有一行出现,因为文本有多行。所以任何人都可以请您提供如何继续或方式的想法做
谢谢
I want to create ListField .In each row of Field i want to display image on the Right and text on the left.I am using the ListField and callback.The text and image is getting displayed but the text is overwriting on the image and also if i change the order i.e image on left and text on the right then the text is getting truncated and only a single line is coming where as the text is of multiple lines .So anyone could you please give an idea of how to proceed or way to do
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用的是哪个操作系统版本?如果您使用的是 OS6 或更高版本,请考虑使用
TableView
(以及关联的TableModel
和TableController
)。它的DataTemplate
功能使您可以更好地控制每行的布局。如果您仍然想使用
ListField
那么您应该显示您遇到问题的代码。Which OS version are you using? If you are using OS6 or higher, consider using a
TableView
(and associatedTableModel
andTableController
) . ItsDataTemplate
feature allows you more control over the layout of each row.If you still want to use a
ListField
then you should show the code you are having trouble with.在此处查看 BlackBerry Advanced UI 组件:http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-managers/ta-p/488276
特别检查 ListStyleButtonField 示例。
包含示例 BlackBerry 项目的 Zip 文件:
http: //supportforums.blackberry.com/rim/attachments/rim/java_dev@tkb/399/4/Advanced%20UI.zip
下载后,执行以下操作将
然后 Advanced UI 项目将被导入到 Eclipse 中,您应该能够在 BlackBerry 模拟器上构建并运行示例应用程序。了解 ListStyleButtonField 的工作原理后,您可以将其复制到您的项目中,或根据您的特定要求进行修改。
请注意,您可能必须将编译器合规级别设置为 1.3 才能使其正常工作。在“项目设置”->“Java 编译器”下执行此操作
Check out the BlackBerry Advanced UI components here: http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-managers/ta-p/488276
In particular check the ListStyleButtonField example.
Zip file containing Example BlackBerry Project:
http://supportforums.blackberry.com/rim/attachments/rim/java_dev@tkb/399/4/Advanced%20UI.zip
Once downloaded, do the following:
The Advanced UI project will then be imported into Eclipse and you should be able to build and run the sample application on the BlackBerry simulator. Once you see how ListStyleButtonField works you can copy it into your project, or modify it to your specific requirements.
Note that you may have to set your compiler compliance level to 1.3 to get this working. Do this under Project Settings->Java Compiler