RemoveAnimation QML Type
A Sailfish-style item-removal animation More...
Import Statement: | import Sailfish.Silica 1.0 |
Properties
Detailed Description
The RemoveAnimation type provides a common item-removal animation for SilicaListView and SilicaGridView.
Here is a simple example:
import QtQuick 2.2
import Sailfish.Silica 1.0
SilicaListView {
id: listView
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 RemoveAnimation is recommended to be used to animate deletion of delegates.
See also ListItem::animateRemoval().
Property Documentation
This property holds the duration of the remove animation, in milliseconds.
The default value is 150.
The item that is animated on removal.