Tagged articles
4 articles
Page 1 of 1
Sohu Tech Products
Sohu Tech Products
Jan 8, 2025 · Mobile Development

Understanding Jetpack Compose Layout Process: Composition, Measurement, and Modifier Nodes

Jetpack Compose’s layout process consists of three steps—measuring children, deciding the parent’s size, and placing children—driven by a MeasurePolicy that respects explicit Constraints, while Modifier nodes adjust those constraints and intrinsic measurements provide size hints, enabling efficient, declarative UI rendering.

Android UIJetpack ComposeKotlin
0 likes · 17 min read
Understanding Jetpack Compose Layout Process: Composition, Measurement, and Modifier Nodes
Sohu Tech Products
Sohu Tech Products
Aug 10, 2022 · Mobile Development

Understanding Jetpack Compose Layout Model and Custom Layout Techniques

This article explains Jetpack Compose's three‑stage layout model, dives into the internals of the Layout composable and Modifier system, and demonstrates how to create custom layouts both by implementing a MeasurePolicy in Layout() and by defining Modifier.layout extensions, complete with code examples.

Android UICustom LayoutJetpack Compose
0 likes · 15 min read
Understanding Jetpack Compose Layout Model and Custom Layout Techniques
Sohu Tech Products
Sohu Tech Products
Feb 16, 2022 · Mobile Development

Understanding the Implementation and Traversal of Modifier Chains in Jetpack Compose

This article explains how Jetpack Compose's Modifier interface is defined, how its concrete implementations such as SizeModifier, Background, Padding, CombinedModifier, and ComposedModifier form a chain, and how the foldIn and foldOut functions enable forward and reverse traversal of that chain for layout processing.

AndroidJetpack ComposeKotlin
0 likes · 14 min read
Understanding the Implementation and Traversal of Modifier Chains in Jetpack Compose