开发者

Blackberry- how to make ListField Headers above each row

So i have a custom ListField class, and it looks prett开发者_Go百科y boring with no headers. Does anyone know if there is a way to make headers above each cell? I am used to iphone programming which made this very easy.


There isn't a built-in feature, but you can just add a Field above it, or use yourScreen.setTitle()/setBanner() if you want it to remain on the screen regardless of scroll position.


  1. Replace the ListField with a VerticalFieldManager to contain your rows.
  2. Move the draw code of your rows from the ListView to a custom Field class's paint method. Or if it's a simple text row, use a LabelField.
  3. Create another custom Field to contain your headers, or use another LabelField.
  4. Add headers and rows to the VerticalFieldManager in the order you want them to appear.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜