ArticlesLayout

How an ArticlesBlock arranges its articles — and with which cell, since not every cell suits every arrangement, so the two are chosen together and an impossible pair cannot be asked for.

The standard cell is a row, a small cover beside the text: it reads at full width, one under the other, the way the publication screen lists an issue's contents — list. The rich cell is a card, its cover on top: it stacks at full width too — richList — or rides a horizontal carousel sized like a shelf of covers — richHorizontal. There is no grid of articles.

A vertical list capped with limit takes the room of its rows and sits in the host's scrolling column; uncapped, it scrolls and paginates on its own and must be given bounded height. Inside a BlockPage, which scrolls as one, a vertical list must therefore be capped.

Sizes, spacings and column counts are the design system's, not the caller's: each arrangement carries the column ladder the design gives its shape.

Instances are created through the factories on the companion object rather than a constructor, so new arrangements can be added without breaking binary compatibility. Each one resolves, once and here, to the arrangement the renderer switches on and the cell the block draws.

Types

Link copied to clipboard
object Companion

The arrangements an articles block can be given.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Two layouts are equal when they arrange their items the same way and draw the same cell. What lets a block tell a layout that changed from the same one rebuilt on recomposition.

Link copied to clipboard
open override fun hashCode(): Int

Consistent with equals: equal layouts hash alike.

Link copied to clipboard
open override fun toString(): String

The factory call that would build this layout — for logs and test failures.