Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 39 Next »

Beta Documentation

The contents of this page are subject to change


Extends: ArrayGrid 

Description

The RowList node is a list of independently scrollable rows of posters. Each item in the list contains a row of posters that can be scrolled left/right independently of the other rows. The posters in any single row must be the same size, but the posters in different rows of the list can have different sizes. In addition to the posters, each row may contain a right-justified title label and a left-justified label that displays a "1 of N" message, indicating which poster in the row currently has the focus.

There are two horizontal scrolling options for the RowList node controlled by the rowFocusAnimationStyle field. Setting the rowFocusAnimationStyle field to floatingFocus causes the focus indicator to float left or right until it reaches the end of the row, at which point the focus will stay fixed on the first or last item in the row and the items will scroll left or right. Setting the rowFocusAnimationStyle field to fixedFocusWrap causes each row to wrap around when navigation reaches the first or last item in the row, as long as the row contains enough items to fill the row. If the row does not contain enough items to fill the row, the focus will float left and right.

The RowList node supports two variations. The first variation provides a simple option for the common case where each item in each row is displayed as a single bitmap. The second variation allows the contents of each item in each row to be an instance of a Scene Graph component that defines a set of interface fields that provide for communication between the RowList node and the items it displays, similar to that used by the MarkupList and MarkupGrid node classes. In the documentation below, the first variation is referred to as simple, and the second variation is referred to as component.

SimpleRowList.zip is a simple example channel using RowList.  This sample creates a one row RowList using the component based approach, i.e., it specifies custom markup for the individual items in the row.

Fields

FieldTypeDefaultSimple/ComponentUse
itemComponentNamestring""componentSpecifies the name of an XML component for the items in each row. An instance of this component is created on demand for each visible item of each row. The XML component must define a specific interface as detailed in RowList XML Component below.
contentContentNodenoneboth

Specifies the content for the list. The content should be a single ContentNode that has one child ContentNode for each row. These child ContentNodes for each row should themselves contains child ContentNodes for each item in the row. See Data Bindings below for more details. 

itemSizevector2d[0,0]bothSpecifies the width and height of rows in the list. Note that this the width of the entire row, not the width of the posters in the row.
itemSpacingvector2d[0,0]bothSpecifies the spacing between rows in the list. The y-dimension of the vector specifies the vertical spacing between rows, and the x-dimension is ignored.
numRowsinteger0bothSpecifies the number of visible rows in the list. Note that the actual number of rows may be more or less than the number of visible rows depending on the number of items in the list content.
rowHeightsarray of floats[ ]both

Specifies the heights of each row of the list. This allows the height of each row of the list to vary from row to row. The values override the height specified in the y-dimension value of the itemSize field. If the array contains fewer elements than the number of rows in the data model, the y-dimension value of the itemSize field is used as the height of the extra rows.

rowSpacingsarray of floats[ ]both

Specifies the spacing after each row of the list. This allows the spacing between rows to vary from row to row. The values override the vertical spacing specified in y-dimension value of the itemSpacing field. If the array contains fewer elements than the number of rows in the data model, the y-dimension value of the itemSpacing field is used as the spacing after the extra rows.

rowItemSizearray of vector2d[ ]both

Specifies the width and height of the items in each row. The array of values must include at least one element. If the array contains fewer elements than the number of rows in the data model, the last value in the array is used as the size for the extra rows.

rowItemSpacingarray of vector2d[ ]both

Specifies the spacing between items in each row. The x-dimension of each array value specifies the horizontal spacing between list items in the corresponding row. If the array contains fewer elements than the number of rows in the data model, the last value in the array is used as the spacing for the extra rows. If the array contains no values, no space will be included between list items in all rows.

focusXOffsetarray of floats[ ]both

Specifies the x-dimension offset of the first fully visible item in each row relative to the left edge of the list. In most cases, the first fully visible item in each row will be positioned at the left edge of the list, so this field does not need to be specified. If the array contains fewer elements than the number of rows in the data model, the last value in the array is used as the x-dimension offset for the extra rows. If the array contains no values, the default x-dimension offset of 0.0 is used.

rowLabelOffsetarray of vector2d[0,0]both

Specifies the offset of the row label for each row. The x-dimension specifies the horizontal offset of the label from the left edge of the row. The y-dimension component specifies the vertical spacing between the label and the list items in the row. If the array contains fewer elements than the number of rows in the data model, the last value in the array is used as the offset for the labels of the extra rows. If the array specified contains no values, a default offset value of [0,0] is used.

showRowLabelarray of Boolean[ ]both

Specifies whether the row label on the left edge of each row is displayed. If the array contains fewer elements than the number of rows in the data model, the last value in array is used to control the display of the row label for the extra rows. If the array contains no values, no row labels are displayed.

showRowCounterarray of Boolean[ ]both

Specifies whether the "1 of N" label on the right edge of each row is displayed. Note that the "1 of N" label is only displayed for the focused row even if the showRowCounter field value for that row is set to true. If the array contains fewer elements than the number of rows in the data model, the last value in array is used to control the display of the "1 of N" label for the extra rows. If the array contains no values, no "1 of N" labels are displayed.

rowFocusAnimationStyleoption stringfloatingFocusboth

Specifies the how the focus indicator moves in a row of items in response to the remote direction pad Left and Right key presses. The possible values are: 

OptionEffect
floatingFocusCauses the focus indicator to float left or right until it reaches the end of the row, at which point the focus indicator will stay fixed on the first or last item in the row, and the items will scroll left or right if there were items that were not visible.
fixedFocusWrapCauses the row to wrap around when the focus indicator reaches the first or last item in the row, as long as the row contains enough items to fill the row. If the row does not contain enough items to fill the row, the focus indicator will float left and right.
rowLabelColorcolor0xffffffffbothSpecifies the color of the row and "1 on N" labels.
rowLabelFontfont

system default

bothSpecifies the font for the row and "1 of N" labels.
drawFocusFeedbackOnTopBooleanfalsebothSpecifies whether the focus indicator bitmap is drawn below or on top of the list items.
drawFocusFeedbackBooleantruebothSpecifies whether or not the focus indicator bitmap is displayed.
imageWellBitmapUriURI string""simpleSpecifies the bitmap file to use to suggest where images would appear for empty lists.
focusBitmapUriURI string""bothSpecifies the bitmap file used for the focus indicator when the list has focus. In most cases, this should be a 9-patch image that specifies both expandable regions as well as margins. Only set this field to specify a custom bitmap that differs in appearance from the default bitmap.
focusFootprintBitmapUriURI string""bothSpecifies the bitmap file used for the focus indicator when the list does not have focus. In most cases, this should be a 9-patch image that specifies both expandable regions as well as margins. Only set this field to specify a custom bitmap that differs in appearance from the default bitmap.
loadingBitmapUriURI string""simpleSpecifies a bitmap file to display while a list item poster is loading.
loadingBitmapOpacityfloat1.0simpleSpecifies an opacity value used to render the loading bitmap.
failedBitmapUriURI string""simpleSpecifies a bitmap file to display when a list item poster fails to load.
failedBitmapOpacityfloat1.0simpleSpecifies an opacity value used to render the failed bitmap.
wrapDividerBitmapUriURI string""bothSpecifies the bitmap file to use as a visual separator between the last and first list items when the list wraps. In most case, this should be a 9-patch image that specifies both expandable regions. Only set this field to specify a custom bitmap that differs in appearance from the default bitmap.
wrapDividerHeightfloat0both

Specifies the height of the divider. The wrap divider bitmap will be scaled to this height. The width of the wrap divider is set to the width of the list items (that is, the x-dimension value of the itemSize field).  

rowItemSelectedarray of integer[ ]bothRead-Only
When an item is selected, set to a 2-element array, where element 0 contains the index of the row containing the selected item, and element 1 contains the index of the selected item in that row.
rowItemFocusedarray of integer[ ]both Read-Only
When an item gains the key focus, set to a 2-element array, where element 0 contains the index of the focused row, and element 1 contains the index of the focused item in that row.
itemSelectedinteger0bothRead-Only
When an item is selected, set to the index of the selected row.
itemFocusedinteger0bothRead-Only
When a row gains the key focus, set to the index of the focused row.
itemUnfocusedinteger0bothRead-Only
When a row loses the key focus, set to the index of the unfocused row.
jumpToIteminteger0bothWrite-Only
When set to a valid item index, causes the list to immediately update so that the specified row moves into the focus position.
animateToIteminteger0bothWrite-Only
When set to a valid item index, causes the list to quickly scroll so that the specified row moves into the focus position.

RowList XML Component

If the RowList node is to use an XML component, the itemComponentName field value should be set to the name of an XML component used to display each item in the row list. An instance of this component is created for each visible item in each row of the list.

If the XML component contains interface fields that match the names shown in the table below, those fields will be updated by the RowList node. This allows the XML component to alter the item appearance based on changes to these interface fields.

Field NameField TypeDescription
itemContentContentNodeContains the data to be displayed by the row list item. The relationship between data in the ContentNode node and the visual elements of the row list item is determined by the scripts in the item XML component. Typically, an observer callback function of the itemContent field is used to update the row list item when then content changes.
widthfloatRead-Only
Set to the width of the item.
heightfloatRead-Only
Set to the height of the item
indexintegerRead-Only
Set to the data model index within the data for the row that contains this item. For example, if this appeared in row 2, then the field is set to 0 for the first item in row 2, 1 for the second item in row 2, and so on.
rowIndexintegerRead-Only
Set to the data model index of the row that contains this item
focusPercentfloatRead-Only
Set to the fractional value (0.0 to 1.0) that this list item overlaps the focus region of the list. This value can be used with scripts or interpolators to smoothly animate the appearance of the list item as it enters/leaves the focus region.
rowFocusPercentfloatRead-Only
Set to the fractional value (0.0 to 1.0) that the row that contains this item overlaps the focus region of the list
rowHasFocusBooleanRead-Only
Set to true if the row that contains this item has focus, false otherwise.
rowListHasFocusBooleanRead-Only
Set to true if the item row has focus, false otherwise.

Data Bindings

RowList node should have a single ContentNode node as the root node in its content field. One child ContentNode node should be added to the root node for each row in the list (these nodes can be thought of as row nodes). Each row node should contain one child ContentNode node for each item in the row (these nodes can be thought of as item nodes).

Row Node Data Bindings

AttributeTypeDescription
TITLEstringThe label for the row

Item Node Data Bindings (Simple)

AttributeTypeDescription
HDGRIDPOSTERURL / HDPOSTERURLURI stringThe image file for the item poster when the screen resolution is set to HD. HDGRIDPOSTERURL is used if non-empty. HDPOSTERURL is used otherwise.
SDGRIDPOSTERURL / SDPOSTERURLURI stringThe image file for the item poster when the screen resolution is set to SD. SDGRIDPOSTERURL is used if non-empty. SDPOSTERURL is used otherwise.
  • No labels