UbuntuListView

A ListView with special features tailored for a look and feel fitting the Ubuntu Touch platform. The UbuntuListView works just like a regular ListView, but it adds special features such as expanding/collapsing items (when used together with the Expandable item). It provides features like automatically positioning the expanding item when it expands and collapsing it again when the user taps outside of it. More...

Import Statement: import Ubuntu.Components 0.1
Inherits:

ListView

Properties

Detailed Description

Examples:

import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem

Item {
    ListModel {
        id: listModel
    }

    UbuntuListView {
        id: ubuntuListView
        anchors { left: parent.left; right: parent.right }
        height: units.gu(24)
        model: listModel

        delegate: ListItem.Expandable {
            id: expandingItem

            expandedHeight: units.gu(30)

            onClicked: {
                ubuntuListView.expandedIndex = index;
            }
        }
    }
}

This component is under heavy development.

Property Documentation

expandedIndex : int

The index of the currently expanded item. -1 if no item is expanded.