Titanium.UI.ListSection
> Titanium.UI.ListSection

A list section is a container within a list view used to organize list items.

Use the Titanium.UI.createListSection method or <ListSection> Alloy element to create a ListSection.

List sections are used to manipulate and organize list items contained within it. For examples of using list sections, see the examples in Titanium.UI.ListView and Titanium.UI.ListItem.

Examples

Alloy XML Markup

ListSection is supported by Alloy 1.2.0 and later.

HeaderView and FooterView are supported on Alloy 1.3.0 and later.

<Alloy>
    <Window fullscreen="true">
        <ListView>
            <ListSection>

                <!-- Sets ListSection's headerView property -->
                <HeaderView>
                    <View backgroundColor="#DDD" height="Ti.UI.SIZE">
                        <Label>Fruits</Label>
                    </View>>
                </HeaderView>

                <ListItem title="Apple" />
                <ListItem title="Orange" />
                <ListItem title="Pear" />

                <!-- Sets ListSection's footerView property -->
                <FooterView>
                    <View backgroundColor="#DDD" height="Ti.UI.SIZE">
                        <Label>3 items</Label>
                    </View>

                </FooterView>
            </ListSection>
        </ListView>
    </Window>
</Alloy>
  • 3.1.0
  • 3.1.0
  • 3.1.0
Defined By

Properties

apiName : Stringreadonly

The name of the API that this proxy corresponds to.

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button returns Ti.UI.Button.

  • 3.2.0
  • 3.2.0
  • 3.2.0
Titanium.UI.ListSection
footerTitle : String

Title of this section footer.

Title of this section footer.

Using this property and footerView together is not supported. Use one or the other.

Titanium.UI.ListSection
footerView : Titanium.UI.View

View to use for this section footer.

View to use for this section footer.

Using this property and footerTitle together is not supported. Use one or the other. In Alloy you can specify this property with a <FooterView> child element of a <ListSection> element (see Examples).

  • 3.2.0
  • 3.2.0
  • 3.2.0
Titanium.UI.ListSection
headerTitle : String

Title of this section header.

Title of this section header.

Using this property and headerView together is not supported. Use one or the other.

Titanium.UI.ListSection
headerView : Titanium.UI.View

View to use for this section header.

View to use for this section header.

Using this property and headerTitle together is not supported. Use one or the other. In Alloy you can specify this property with a <HeaderView> child element of a <ListSection> element (see Examples).

  • 3.2.0
  • 3.2.0
  • 3.2.0
Titanium.UI.ListSection
items : ListDataItem[]

Items of this list section.

Items of this list section.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.

  • 3.6.0
Defined By

Methods

Titanium.UI.ListSection
( dataItems, [animation] )
Appends the data entries to the end of the list section. ...

Appends the data entries to the end of the list section.

On iOS, the list item(s) can be inserted with an animation by specifying the animation parameter.

Parameters

Returns

  • void
Applies the properties to the proxy. ...

Applies the properties to the proxy.

Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
Titanium.UI.ListSection
( itemIndex, count, [animation] )
Removes count entries from the list section at the specified index. ...

Removes count entries from the list section at the specified index.

On iOS, the list item(s) can be removed with an animation by specifying the animation parameter.

Parameters

  • itemIndex : Number

    Index of where to remove items.

  • count : Number

    Number of items to remove.

  • animation : ListViewAnimationProperties (optional)

    Animation properties. (iOS only.)

Returns

  • void
Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

  • String
Titanium.UI.ListSection
( ) : String
Gets the value of the footerTitle property. ...

Gets the value of the footerTitle property.

Returns

  • String
Titanium.UI.ListSection
( ) : Titanium.UI.View
Gets the value of the footerView property. ...

Gets the value of the footerView property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

Titanium.UI.ListSection
( ) : String
Gets the value of the headerTitle property. ...

Gets the value of the headerTitle property.

Returns

  • String
Titanium.UI.ListSection
( ) : Titanium.UI.View
Gets the value of the headerView property. ...

Gets the value of the headerView property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

Titanium.UI.ListSection
( itemIndex ) : ListDataItem
Returns the item entry from the list view at the specified index. ...

Returns the item entry from the list view at the specified index.

Parameters

  • itemIndex : Number

    Index of where to retrieve an item.

Returns

Titanium.UI.ListSection
( ) : ListDataItem[]
Gets the value of the items property. ...

Gets the value of the items property.

Returns

Gets the value of the lifecycleContainer property. ...

Gets the value of the lifecycleContainer property.

  • 3.6.0

Returns

Titanium.UI.ListSection
( itemIndex, dataItems, [animation] )
Inserts data entries to the list section at the specified index. ...

Inserts data entries to the list section at the specified index.

On iOS, the list item(s) can be inserted with an animation by specifying the animation parameter.

Parameters

Returns

  • void
Titanium.UI.ListSection
( index, count, dataItems, [animation] )
Removes count entries from the list section at the specified index, then inserts data entries to the list section at ...

Removes count entries from the list section at the specified index, then inserts data entries to the list section at the same index.

On iOS, the list item(s) can be replaced with an animation by specifying the animation parameter.

Parameters

  • index : Number

    Index of where to remove then insert items.

  • count : Number

    Number of list items to remove.

  • dataItems : Array<ListDataItem>

    List items to insert.

  • animation : ListViewAnimationProperties (optional)

    Animation properties. (iOS only.)

Returns

  • void
Titanium.UI.ListSection
( footerTitle )
Sets the value of the footerTitle property. ...

Sets the value of the footerTitle property.

Parameters

  • footerTitle : String

    New value for the property.

Returns

  • void
Titanium.UI.ListSection
( footerView )
Sets the value of the footerView property. ...

Sets the value of the footerView property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Parameters

Returns

  • void
Titanium.UI.ListSection
( headerTitle )
Sets the value of the headerTitle property. ...

Sets the value of the headerTitle property.

Parameters

  • headerTitle : String

    New value for the property.

Returns

  • void
Titanium.UI.ListSection
( headerView )
Sets the value of the headerView property. ...

Sets the value of the headerView property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Parameters

Returns

  • void
Titanium.UI.ListSection
( dataItems, [animation] )
Sets the data entries in the list section. ...

Sets the data entries in the list section.

On iOS, the list item(s) can be inserted with an animation by specifying the animation parameter.

Parameters

Returns

  • void
Sets the value of the lifecycleContainer property. ...

Sets the value of the lifecycleContainer property.

  • 3.6.0

Parameters

Returns

  • void
Titanium.UI.ListSection
( index, dataItem, [animation] )
Updates an item at the specified index. ...

Updates an item at the specified index.

On iOS, the list item can be updated with an animation by specifying the animation parameter.

Parameters

Returns

  • void