Lists and tables
Use lists and tables to display items that users can highlight and open. If the list is long, items are fetched and displayed in batches. When users reach the last item in the list, the next batch of items displays at the end of the list.
Use a simple list to easily display text in rows.
Use a rich list to easily display rows of text and icons. Currently, rich lists only display information and are not interactive.
If you want to present items in columns and rows, use a table.
You can group items under headers to help users navigate through long lists. For example, you can create headers that collapse, making it easier for users to find items in the list.
You can also group items under headers that always appear at the top of the list. For example, you can add a date as a header and group messages received on that date under the header. Users can highlight a header to perform an action on the group of items or they can use shortcut keys to move through the list.
Users can perform the following actions in lists and tables:
Best practice: Implementing lists and tables
- Use the SimpleList class to create a list with text. Use the RichList class to create a display-only list with text and icons. Use the TableView class to create an interactive rich list with text and icons. For more information about creating lists, see the API reference for the BlackBerry® Java® SDK and the BlackBerry Java Application UI Quick Reference Guide.
- Use the TableView class to create a table with rows and columns. You can use the GridFieldManager if the number of rows and columns in the table are fixed. For more information about creating tables, see the API reference for the BlackBerry® Java® SDK and the BlackBerry Java Application UI Quick Reference Guide.
- If the list is long and you want to display the items on separate screens, include Next and Previous buttons at the bottom of the screen. Alternatively, if the list is very long (for example, thousands of items), provide screen numbers instead.
- If you expect users to move through the items in the list (for example, in a message list or a feed), assign shortcut keys for moving to the next or previous item in the list. Where possible, in English, allow users to press "N" to move to the next item in the list and "P" to move to the previous item in the list.