AppDimens Dynamic

May 12, 2026 · View on GitHub

Doc base (Git ref 3.1.5): https://github.com/bodenberg/appdimens-dynamic/blob/3.1.5/

This file supplements SKILL.md. Read it when you need package locations, symmetry between Compose and code, or core types.

Module layout (library)

Paths below are as in the upstream repo at 3.1.5; the consumer app does not contain this tree unless they clone the monorepo.

  • com.appdimens.dynamic.common — shared enums/value types: DpQualifier (SMALL_WIDTH, HEIGHT, WIDTH), Inverter, Orientation, UiModeType, UnitType, DpQualifierEntry.
  • com.appdimens.dynamic.core — cross-cutting engine: DimenCache (sharded cache, init, invalidation, internal CalcType per strategy family), DimenCalculationPlumbing (qualifier resolution, screen dp reads, aspect-ratio multiplier helper, and internal paths tied to caller-supplied flags the skill workflow does not surface to end users), DesignScaleConstants, AspectRatioLookup, percent/resize math (PercentSpaceMath, ResizeMath, ResizeBound, AutoResizePercentBasis), Compose integration (CompositionLocals / AppDimensProvider, LocalUiModeType, remember-stamp helpers in ComposeRememberStamps, ComposeDimenRemember).
  • com.appdimens.dynamic.compose.<strategy> — one folder per scaling strategy for Compose UI (e.g. compose/scaled/DimenSdp.kt, DimenSdpExtensions.kt, DimenScaled.kt, Sp mirrors).
  • com.appdimens.dynamic.code.<strategy> — mirror of the same strategy for Views / non-Compose Kotlin (and Java callers): DimenSdp, DimenSsp, *DpExtensions, *SpExtensions, DimenScaled, Dimen*PlainPx.kt for Float px + Context branching, code/plain/DimenPlainBranch.kt shared plain logic.
  • com.appdimens.dynamic.compose.resize / com.appdimens.dynamic.code.resize — constraint-based resize (binary search over discrete px steps, “fits” predicate); not the same as calculateRawScaling curves.

Strategy → documentation file

Folder suffixDoc
scaledDOCUMENTATION/scaled.md
percentDOCUMENTATION/percent.md
powerDOCUMENTATION/power.md
fluidDOCUMENTATION/fluid.md
autoDOCUMENTATION/auto.md
diagonalDOCUMENTATION/diagonal.md
fillDOCUMENTATION/fill.md
fitDOCUMENTATION/fit.md
interpolatedDOCUMENTATION/interpolated.md
logarithmicDOCUMENTATION/logarithmic.md
perimeterDOCUMENTATION/perimeter.md
densityDOCUMENTATION/density.md
resizeDOCUMENTATION/resize.md
units (physical)DOCUMENTATION/physical-units.md

Product / formal math (English): PRD.md · PDR.md · MATHEMATICS-AND-CALCULUS.md

Example application module (app)

Upstream sample module only (not shipped inside io.github.bodenberg:appdimens-dynamic); use for pattern reference:

Internal DimenCache.CalcType (debug / cache tagging)

Maps to package families: AUTO, DIAGONAL, FILL, FIT, FLUID, INTERPOLATED, LOGARITHMIC, PERCENT, PERIMETER, POWER, RESIZE, SCALED, UNITIES, ASPECT_RATIO, DENSITY — see DimenCache.kt. End users think in strategy names and imports, not this enum.

What this reference intentionally skips

Per the skill: do not expand on ignoreMultiWindows or *i / *ia suffix workflows when guiding users — those are omitted from the interactive workflow.