如何实现某个List设计?
我需要实现一个列表,如下面的屏幕截图所示!
现在,我的问题是,您建议使用什么 BB 组件?
我想到了 RichList,但是定制这个组件的可能性并不大。 另一种选择是表格。
还有其他方法可以实现吗?是否可以自定义 RichList 使其看起来像下面的屏幕截图一样?
设置:BB Eclipse 插件 v1.3、SDK 6.0
i need to implement a list as shown in the screenshot below!
now, my question is, what BB component do you suggest to use?
i thought of a RichList, but there are not many possibilities to customize this component afaik.
the alternative would be a Table.
are there other ways to implement this? is it possible to customize a RichList in a way to make it look like the screenshot below?
Setup: BB Eclipse Plugin v1.3, SDK 6.0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 ListField。您必须自己绘画才能设置单独的行,但这将是最有效的方法。
Use a ListField. You will have to do your own painting to setup an individual row, but it will be the most efficient way of doing this.
我还没有深入研究 6.0 SDK,但这里有一个可能的解决方案供您列出:
列表中的每个项目都是一个 HorizontalFieldManager。该 HorizontalFieldManager 将包含左侧的图像(这将是一个 BitmapField)和一个 VerticalFieldManager。 VerticalField 管理器将包含 2 个 LabelField。第一个用于粗体的第一行,第二个用于下面的行。
当然,第一个 HorizontalFieldManager 必须是可聚焦的。您可以重写 onFocus、onUnfocus 和 Paint 方法来处理字段的聚焦(选定)/未聚焦(未选定)状态。
正如我上面所解释的,该列表将是一个包含自定义 HorizontalFieldManager 元素的 VerticalFieldManager。
我并不是说这是最好的解决方案,但它是一个解决方案并且它有效(我已经为 OS 4.5 - 5.0 做了类似的事情)。
I haven't studied the 6.0 SDK very much, but here is a possible solution for you list:
Each item in the list would be a HorizontalFieldManager. This HorizontalFieldManager would contain the image on the left(this would be a BitmapField) and a VerticalFieldManager. The VerticalField manager would contain 2 LabelFields. The first one for the first row that is bold, and the second one for the rows underneath.
Of course, the first HorizontalFieldManager would have to be FOCUSABLE. You can override the onFocus, onUnfocus and paint methods to handle the focused(selected)/unfocused(unselected) states of the field.
The list would be a VerticalFieldManager that contains custom HorizontalFieldManager elements, as I explained above.
I'm not saying that this is the best solution, but it's a solution and it works(I've done something similar for OS 4.5 - 5.0).