ListItemStyle QML Type
Style API for ListItem component. More...
Import Statement: | import Lomiri.Components.Styles 1.3 |
Since: | Lomiri.Components.Styles 1.2 |
Properties
- animatePanels : bool
- dragPanel : Item
- dropAnimation : PropertyAnimation
- flickable : Flickable
- listItemIndex : in
- snapAnimation : Animation
Methods
- rebound()
- swipeEvent(SwipeEvent event)
Detailed Description
Style API for the ListItem component which provides actions, select and drag handler delegates, and snap animation via its properties. ListItem treats the style differently compared to the other components, as it loads the style only when needed and not upon component creation.
Property Documentation
animatePanels : bool |
The property drives the different panel animations in the style. Panels should not be animated when created upon scrolling a view.
dragPanel : Item |
dropAnimation : PropertyAnimation |
The property holds the animation executed on ListItem dropping.
[read-only] flickable : Flickable |
The property proxies the ListItem's index context property to the style, which is either the index of the list item in a ListView or the child index. Use this property rather than the index
context property as that may not be defined in situations where the ListItem is not a delegate of a ListView or Repeater.
This property was introduced in Lomiri.Components.Styles 1.3.
snapAnimation : Animation |
Holds the behavior used in animating when snapped in or out.
Method Documentation
The function is called by the ListItem when a swipe action is performed, i.e. when the swipe is started, the position is updated or the swipe ends. The event object provides information about the swipe status, positions and the updated ListItem.contentItem position. The style implementation can override the contentItem position by setting the event.content.x
or event.content.y
properties to the desired value.
The event
object properties are:
status
- enumeration ofStarted, Updated, Finished
values representing the swipe event statusto
- (x, y) coordinates of the current mouse/touch point - read-onlyfrom
- (x, y) coordinates of the previous mouse/touch point - read-onlycontent
- (x, y) updated coordinates of the ListItem.contentItem, read-write