Material Design 3 & Adaptive Layouts Quiz

UI › Material & Nav

What is the minimum Android version required for dynamic color (Material You) in Compose?

Answer: Android 12 / API 31

dynamicLightColorScheme and dynamicDarkColorScheme derive colors from the wallpaper and are only available on Android 12 (API 31) and above; older versions must use a static ColorScheme.

Which width range corresponds to the Compact window width size class?

Answer: width < 600dp

Compact width is any window narrower than 600dp, which covers essentially all phones in portrait. 480dp is the height threshold, not width.

Which composable automatically chooses between a bottom NavigationBar and a NavigationRail as the window size changes?

Answer: NavigationSuiteScaffold adapts bar or rail to the window size.

NavigationSuiteScaffold picks the navigation component (bar, rail, or drawer) for you based on the current window size class and posture. Scaffold alone does not adapt navigation.

What determines an app's window size class?

Answer: The size of the window currently available to the app

Window size classes are based on the window area available to the app, so they change with split-screen, multi-window, and folding, and are explicitly not tied to the physical screen.

How does Material 3 primarily represent surface elevation?

Answer: A tonal color overlay that tints the surface toward the primary color

M3 adds a tonal overlay so higher surfaces are tinted more toward the primary color, controlled via tonalElevation; shadowElevation is separate and optional. This is especially visible in dark theme.

Which scaffold is the canonical choice for a list-detail layout that shows both panes on large screens?

Answer: ListDetailPaneScaffold

ListDetailPaneScaffold (commonly via NavigableListDetailPaneScaffold) shows list and detail side by side in expanded width and collapses to one pane on smaller windows. SupportingPaneScaffold is for a main + supporting pane pattern.

What is the dp range for the Medium window width size class?

Answer: 600dp <= width < 840dp

Medium width spans 600dp up to just below 840dp (typical tablets in portrait / large unfolded displays). 840dp begins Expanded, and 480-900dp is a height range, not width.

Scaffold passes a PaddingValues to its content lambda. What should you do with it?

Answer: Apply it via Modifier.padding so content isn't drawn under the app bar

Scaffold reports the space consumed by its bars and insets as PaddingValues; you must apply it to the content (or hand it to a scrolling list as contentPadding), otherwise content is obscured behind the app bar or navigation bar.

In the Material 3 color system, which color role should be used for text and icons drawn on top of a surface colored with the primary role?

Answer: onPrimary

M3 color roles come in pairs: content placed on a primary-colored surface uses onPrimary to guarantee sufficient contrast. surfaceTint controls the tonal elevation overlay, and primaryContainer is a separate lower-emphasis container color.

Which artifact provides currentWindowAdaptiveInfo() along with adaptive scaffolds such as ListDetailPaneScaffold and NavigationSuiteScaffold?

Answer: androidx.compose.material3.adaptive family, including nav/layout modules

The adaptive APIs ship in the androidx.compose.material3.adaptive family of artifacts; currentWindowAdaptiveInfo() lives there, separate from the core material3 components and unrelated to the older window-embedding library.

To make a Material 3 TopAppBar collapse and re-expand as the user scrolls a list, what is the required wiring?

Answer: Pass a TopAppBarScrollBehavior to the bar and wire Scaffold via nestedScroll

Collapsing behavior is driven by a TopAppBarScrollBehavior (for example enterAlwaysScrollBehavior) passed to the bar, with the Scaffold wired through nestedScroll so scroll deltas reach the app bar. The other options do not produce the built-in collapse effect.

Your app supports API 24+ and wants Material You dynamic color only where available. What is the correct strategy?

Answer: Check Build.VERSION.SDK_INT and use a static ColorScheme below API 31

dynamicLightColorScheme/dynamicDarkColorScheme require API 31+, so you branch on Build.VERSION.SDK_INT and supply a hand-authored static ColorScheme on older devices. The dynamic functions are not available to call at all below API 31.

What does MaterialTheme.shapes define in Material 3?

Answer: A set of corner styles (extraSmall through extraLarge) used by components

shapes holds the named corner styles from extraSmall to extraLarge; components reference them so, for example, cards and buttons get consistent rounded corners. Elevation, motion, and spacing are handled by separate systems.

Beyond Compact, Medium, and Expanded, current Material 3 guidance adds wider breakpoints. At what minimum window width does the Large width size class begin?

Answer: 1200dp

The width breakpoints are Compact (<600), Medium (600-839), Expanded (840-1199), Large (1200-1599), and Extra-large (>=1600), so Large starts at 1200dp. 840dp is the start of Expanded and 1600dp is the start of Extra-large.

Back to Material Design 3 & Adaptive Layouts