Article

stack

Groups and lays out elements vertically.

Overview

The stack element groups elements together and lays them out vertically, starting from the top of the containing element. Each element is placed directly underneath the preceding element.

<stack>
    <title>WWDC Road Trip</title>
    <row>
        <text><badge src="resource://tomato-fresh"/> 99%</text>
        <text>1hr 54min</text>
        <text>Comedy</text>
        <text>2015</text>
        <badge src="resource://mpaa-pg" class="badge" />
        <badge src="resource://cc" class="badge" />
    </row>
    <description handlesOverflow="true">An aspiring developer gets a ticket to WWDC, but can't afford to fly there. Now he needs to get across country in time for the keynote, and the only person who can help him is his slacker roommate.</description>
    <text>Language information can go here</text>
    <row>
        <buttonLockup>
            <badge src="resource://button-preview" />
            <title>Preview</title>
        </buttonLockup>
        <buttonLockup type="buy">
            <text>$9.99</text>
            <title>Buy</title>
        </buttonLockup>
    </row>
</stack>

Subelements of stack

Elements that Use stack

Topics

Valid TVML Styles

height

Specifies the height of an element.

margin

Specifies the spacing around an element.

width

Specifies how wide an element is.

Valid TVML Attributes

binding

Associates information in a data item with an element.

prototype

Associates a data item type with an element.

theme

Sets the color scheme for an element.

See Also

Container Elements

carousel

Arranges images in a row.

grid

Arranges elements in a grid pattern.

imgDeck

Contains several images to be displayed at a later time.

infoTable

Displays contained element information in a vertical format, with each successive element directly below the previous element.

organizer

Creates a generic element with its contained elements arranged through TVML styles.

row

Displays elements horizontally.

section

Combines elements and acts as a single element.

shelf

Displays elements horizontally and adds the ability to scroll to offscreen elements.