PinnableContainer
Interface
Common
interface PinnableContainer
Represents a container which can be pinned when the content of this container is important.
For example, each item of lazy list represents one PinnableContainer
, and if this container is
pinned, this item will not be disposed when scrolled out of the viewport.
Pinning a currently focused item so the focus is not lost is one of the examples when this functionality can be useful.
Functions
fun pin(): PinnedHandle
Allows to pin this container when the associated content is considered important.
For example, if this PinnableContainer
is an item of lazy list pinning will mean this item
will not be disposed when scrolled out of the viewport.
Don't forget to call PinnedHandle.release
when this content is not important anymore.