开发者

How to implement a certain List design?

i ne开发者_C百科ed 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

How to implement a certain List design?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜