Platform map and Android verification

May 13, 2026 · View on GitHub

English-only companion to the submodule READMEs. Strategy names here are conceptual until you paste the submodule API you integrate. Migrating unified Android labels (FIXED / DEFAULT / BALANCED): MIGRATION.md.

Authoritative Compose math + prefix catalogue: appdimens-dynamic/DOCUMENTATION/MATHEMATICS-AND-CALCULUS.md, README.md, COMPOSE-API-CONVENTIONS.md.

flowchart LR
    concept["Scaling concept"] --> submodule["Submodule README"]
    submodule --> surface["Codegen or resources"]

Submodule status snapshot

Always reconfirm semver in the submodule README before pinning — this column is a coarse "production-ready?" indicator only.

SubmodulePlatformStatus
appdimens-dynamicAndroid (Compose + Kotlin + Java)Production
appdimens-sdpsAndroid (XML + Compose)Production
appdimens-sspsAndroid (XML + Compose, text)Production
appdimens-gamesAndroid (Kotlin + NDK + OpenGL ES)Work in progress
appdimens-iosiOS / macOS (UIKit + SwiftUI + Metal)Work in progress
appdimens-dynamic-kmpKotlin MultiplatformWork in progress
appdimens-flutterFlutter (Android / iOS / Web / desktop)Work in progress
appdimens-react-nativeReact NativeWork in progress
appdimens-webWeb (vanilla / React / Vue / Svelte / Angular)Work in progress

Concept → binding (all stacks)

Concrete syntax lives beside the source — not in this table. Snapshot for orientation only:

ConceptAndroid Compose (appdimens-dynamic)iOS (AppDimens)Web (webdimens)Flutter (appdimens)React Native (appdimens-react-native)
Hybrid BALANCED curveautoasdp, ahdp, awdp, assp, … auto.mdAppDimens.shared.balanced(_).toPoints()balanced(_) builder.fixed, .fx per Flutter submodulebalanced(_)
SDP-style baseline (DEFAULT / FIXED narrative)scaledsdp, wdp, hdp, ssp, sem, … scaled.mdSubmodule READMEdefaultScaling-style helpers where publishedSame fixed-style helpersdefaultScaling(_)
Logarithmic dampingPrefer explicit logarithmic or AR-aware scaled tokens — no mythical defaultDpdefaultScaling, logarithmicdefaultScaling, logarithmicbuilder-specificHelpers as exposed
PERCENTAGE / legacy DYNAMICpercentpsdp, pwdp, phdp, … percent.mdpercentage(_)percentage(_)Dynamic builders .dypercentage(_)
Raw XML SDP/SSPSeparate artifacts appdimens-sdps, appdimens-ssps
Native gamesappdimens-games façadesubmodule Metal layer
Builder smart chainingCompose tree uses explicit tokens (sdp, asdp, …) — no fused smart().forElement.smart(_).forElement(_) variantsEquivalent hooks where publishedEquivalent hooksEquivalent hooks

Physical units (mm / cm / inch) — across stacks

Real-world measurements where they matter (kiosks, AR, accessibility touch targets). Each cell links to the submodule entry point.

ConceptAndroid Compose / codeiOSFlutterReact NativeWeb
Millimetres10.mm (Compose); DimenPhysicalUnits.toDpFromMm(10f) (physical-units.md)AppDimensPhysicalUnits.mm(10)AppDimensPhysicalUnits.mmToPixels(10, context)physicalUnits.mm(10)webdimens.mm(10)
Centimetres8.cm (Compose)AppDimensPhysicalUnits.cm(8)AppDimensPhysicalUnits.cmToPixels(8, context)physicalUnits.cm(8)webdimens.cm(8)
Inches5.inch (Compose)AppDimensPhysicalUnits.inch(5)AppDimensPhysicalUnits.inchToPixels(5, context)physicalUnits.inch(5)webdimens.inch(5)

The Android implementation uses displayMetrics.xdpi / ydpi — see physical-units.md for the formal definition and per-axis caveats.

Sources of truth: appdimens-dynamic README · Flutter appdimens.dart · Web WebDimensBuilder.ts · RN AppDimensBuilder.ts · iOS examples / USAGE_GUIDE.md.


appdimens-dynamic roster (Gradle strategy ↔ Compose import)

Older hub prose used ENUM-like headings. appdimens-dynamic implements each kernel as its own Gradle source package:

Cross-platform wordingGradle strategyCompose import sketchDoc
BALANCEDautocom.appdimens.dynamic.compose.auto.*auto.md
DEFAULT / FIXEDscaledcompose.scaled.* (sdp, wdp, hdp, ssp)scaled.md
PERCENTAGE / legacy DYNAMICpercentcompose.percent.*percent.md
Steven’s law knobpowercompose.power.*power.md
Clamp / band typographyfluidcompose.fluid.*fluid.md
Weber–Fechner stylelogarithmiccompose.logarithmic.*logarithmic.md
Blend vs linearinterpolatedcompose.interpolated.*interpolated.md
Hypotenuse feeldiagonalcompose.diagonal.*diagonal.md
W+H pacingperimetercompose.perimeter.*perimeter.md
Letterboxfitcompose.fit.*fit.md
Coverfillcompose.fill.*fill.md
Density knobsdensitycompose.density.*density.md
Constraint resizeresizecompose.resize.*, ResizeBoundresize.md
NONEPlain Dp/Sp or guard rails

Prefix naming rules: COMPOSE-API-CONVENTIONS.md


Constants checked against Kotlin

Compared with DesignScaleConstants.kt:

ConstantValueMeaning
BASE_WIDTH_DP300fReference width denominator
BASE_HEIGHT_DP533fCompanion height baseline
REFERENCE_ASPECT_RATIO1.78fAR normalization for multipliers
Diagonal baseline\sqrt{$300^{2}$+533^2} ≈ 611.63 dpFor diagonal strategy
Perimeter baseline833 dpFor perimeter strategy
auto hingemeasured axis 480 dp (DimenAutoDp.kt)BALANCED narrative
auto ln gain0.4fLog damping coefficient

Heavy linear algebra layouts live in MATHEMATICS-AND-CALCULUS.md §§3–4. Performance notes echo from submodule library/PERFORMANCE.md.


auto (BALANCED) kernel recap

Kotlin path calculateAutoDpCompose (DimenAutoDp.kt) with inv = 1/300, transition = 480, sensitivity = 0.4:

  1. If axis dim ≤ 480 dp: scale = dim × inv (linear segment identical to SDP thinking on phones).
  2. If dim > 480 dp: scale = transition·inv + sensitivity·ln(1 + (dim - transition)·inv).

Output before optional AR suffix a is base × scale × (aspect ratio multiplier). Matches submodule DOCUMENTATION/auto.md.


scaled, percent, Smart builders

scaled: Plain linear scale when AR compensation is OFF; f.arMultiplier path when documented suffixes flip AR on (scaled.md).

percent: Matches percent.md §4 matrices (axis dp × global inverse).

Smart inference: Kotlin does not ship smart(...).forElement(...) wrappers; other stacks may—keep Android guidance explicitly strategy-per-call. Strategy selection order summarized in README (scaled → percent → auto when reading older tables).

Regression coverage: StrategyModuleFormulasTest.kt in appdimens-dynamic (MATHEMATICS-AND-CALCULUS.md §6).


Cross-platform numeric parity (historical QA snapshot)

For the audited reference row 48 dp base on a ~720 dp-wide canvas, stacks that shipped the canonical kernel landed within ~0.1 dp of each other:

Platform familyNarrative curveResult
Audited snapshots (Android/iOS/Web/Flutter/RN)Hybrid BALANCED~69.7 dp
Same cohortPhone-first DEFAULT prose~79.2 dp
Same cohortProportional / axis-heavy storyline~115.2 dp

Treat this as reassurance that narratives match reference implementations — not a pledge about every nightly build on every roadmap module. Always run your submodule tests before pinning.


Sources of truth (per submodule)

When prose in this hub disagrees with the submodule, the submodule wins. Use this list when porting concepts, verifying signatures, or filing shipping bugs.


← Documentation index · appdimens-dynamic README · GUIDE · THEORY · MIGRATION · ORIENTATION