ShowcaseFeedScope

Declares the sections of a ShowcaseFeed, like a LazyColumn DSL.

Functions

Link copied to clipboard
abstract fun customSection(key: Any? = null, content: @Composable () -> Unit)

Any other content, such as a hero banner, placed directly in the feed.

Link copied to clipboard
abstract fun <T> section(title: String, items: List<T>, key: Any? = null, actionLabel: String? = null, onAction: () -> Unit? = null, itemWidth: ShowcaseItemWidth = ShowcaseItemWidth.Peek(), rows: Int = 1, rowHeight: Dp? = null, snapping: ShowcaseSnapping = ShowcaseSnapping.ITEM, rowContentDescription: String? = null, itemKey: (index: Int, item: T) -> Any? = null, titleStyle: TextStyle? = null, itemContent: @Composable (item: T) -> Unit)

A SectionHeader above a ShowcaseRow. Sections can use different item types.

Link copied to clipboard
abstract fun <T> verticalSection(title: String, items: List<T>, key: Any? = null, itemKey: (index: Int, item: T) -> Any? = null, titleStyle: TextStyle? = null, hasMore: Boolean = false, isLoadingMore: Boolean = false, onLoadMore: () -> Unit? = null, itemContent: @Composable (item: T) -> Unit)

A SectionHeader followed by items emitted straight into the feed, each lazily, so the section can grow as the user scrolls. While hasMore, a LoadMoreFooter calls onLoadMore when it scrolls into view. Give each vertical section a key when a feed has several.