BlockPageScope

interface BlockPageScope

Declares the blocks of a BlockPage.

A page scrolls as one, so nothing inside it may scroll vertically on its own. Carousels never do and need no cap. Everything that lays out lines — IssuesLayout.grid, IssuesLayout.richList, ArticlesLayout.list, ArticlesLayout.richList — must be capped with limit, the way a summary and an archives teaser are: capped, a block draws the fixed number of lines its items fall on and never paginates. Use the standalone block composables when an uncapped grid or list is wanted.

Not intended to be implemented outside the SDK.

Functions

Link copied to clipboard
abstract fun articles(onEvent: (ArticlesBlockEvent) -> Unit, source: ArticlesBlockSource = ArticlesBlockSource.all(), layout: ArticlesLayout = ArticlesLayout.list(), title: String? = null, showHeaderAction: Boolean = false, limit: Int? = null, header: @Composable () -> Unit? = null, footer: @Composable () -> Unit? = null)

Adds a list of articles. Same behaviour as ArticlesBlock.

Link copied to clipboard
abstract fun custom(key: Any, content: @Composable () -> Unit)

Inserts arbitrary caller-owned content between two blocks, inside the page's own scrolling container — a banner, a promotion, a separator.

Link copied to clipboard
abstract fun issues(onEvent: (IssuesBlockEvent) -> Unit, source: IssuesBlockSource = IssuesBlockSource.all(), layout: IssuesLayout = IssuesLayout.horizontal(), title: String? = null, showHeaderAction: Boolean = false, limit: Int? = null, header: @Composable () -> Unit? = null, footer: @Composable () -> Unit? = null)

Adds a shelf of issues. Same behaviour as IssuesBlock.