AddAnimation QML Type
A Sailfish-style item-addition animation More...
Import Statement: | import Sailfish.Silica 1.0 |
Detailed Description
The AddAnimation type provides a common item-addition animation for SilicaListView and SilicaGridView.
Here is a simple example:
import QtQuick 2.2
import Sailfish.Silica 1.0
SilicaListView {
model: 100
anchors.fill: parent
delegate: BackgroundItem {
id: backgroundItem
onClicked: {
listView.model = (listView.model == 100 ? 5 : 100)
}
ListView.onAdd: AddAnimation {
target: backgroundItem
}
ListView.onRemove: RemoveAnimation {
target: backgroundItem
}
Label {
x: Theme.paddingLarge
anchors.verticalCenter: parent.verticalCenter
color: parent.down ? Theme.highlightColor : Theme.primaryColor
text: "Index: " + index
}
}
VerticalScrollDecorator {}
}
The AddAnimation is recommended to be used to animate creation of delegates.