ContentWidth

sealed interface ContentWidth(source)

How wide a destination's content may grow on a large window.

Content that reads well at phone width, such as lists and forms, looks lost stretched across a desktop window. With Default the shell centres it in a column no wider than com.mihaicristiancondrea.android.libs.apptoolkit.navigation.layout.ShellLayoutPolicy.contentMaxWidth, leaving margins on either side the way a website does. The app bar still spans the window.

Inheritors

Types

Link copied to clipboard
data object Default : ContentWidth

The policy's maximum width.

Link copied to clipboard
data object Full : ContentWidth

The whole width the shell has, for grids, maps and media that use every pixel.

Link copied to clipboard
data class Max(val width: Dp) : ContentWidth

A maximum of this destination's own.