v1.5.0
What's Changed
- Add new gesture based drag interaction.
- Add pointer behavior enumeration.
New configurations
It is now possible to define new drag interaction which is based on the direction of the drag, rather than relying on the start and end regions. This new configuration could be set via dragInteraction param in rememberPageCurlConfig:
PageCurl(
count = pages.size,
config = rememberPageCurlConfig(
dragInteraction = PageCurlConfig.GestureDragInteraction()
)
) { index ->
HowToPage(index, pages[index])
}
Also it is now possible to make page's edge to follow user's finger in drag interaction. This new configuration could be set via pointerBehavior param in StartEndDragInteraction:
PageCurl(
count = pages.size,
config = rememberPageCurlConfig(
dragInteraction = PageCurlConfig.StartEndDragInteraction(
pointerBehavior = PageCurlConfig.DragInteraction.PointerBehavior.PageEdge
)
)
) { index ->
HowToPage(index, pages[index])
}
Or in new :