Note: | Rather than adding logic to the view’s controller to populate the ListView object, you can use a content provider to populate a ListView. For example, you might populate the ListView with the response from a REST service. For more information, see Using a Content Provider to Populate a
ListView. |
Object | Description |
ListView | Required. Defines the ListView. |
Pagination | Optional. Specifies how many list items to display per page and identifies templates for objects that the user selects to view the next or previous page of results. |
Template for... | Description |
List item | Required. You must create a template that defines how to display a single item from the data source. Typically, you create a template for a Table or TableButton object. When you add logic to the controller for the view, you invoke the Java class for this template to display an item in the view. |
List header | Optional. You can create a template to provide a header for the ListView. For example, you might create a template for an object like a Textfield or an Image. If you want to provide a header for the ListView, specify the template in the ListView object’s List View Header property. |
List separator | Optional. You can create a template for an object that you want to display between each list item in the ListView. For example, you might create a template for an object like a Separator, Spacer, or Image object. If you want to provide a separator for the list of data, specify the template in the ListView object’s Separator property. |
Control to show when reloading data | Optional. You can create a template for an object that the application will display when the application is accessing the data source to refresh the data. For example, you might create a template for an object like a ProgressAnim, Image, or Textfield object. If you want the application to display an object when refreshing the data, specify the template in the ListView object’s Show On Reload property. |
Control to display the next page of results | Conditionally required. Create a template for an object, for example, a Button object, that a user selects at run time to display the next page of results. This template is required if you are using the Pagination object. You specify this template in the Pagination object’s Next Page Template property. |
Control to display the previous page of results | Conditionally required. Create a template for an object, for example, a Button object, that a user selects at run time to display the previous page of results. This template is required if you are using the Pagination object. You specify this template in the Pagination object’s Previous Page Template property. |