AppDimens documentation hub

May 13, 2026 · View on GitHub

This folder explains ideas, vocabulary, and the mathematical theory shared across every AppDimens platform library. It is theory-only: no semver, no install lines, no platform-specific build configuration. Submodule READMEs remain the authority for pinned versions, Gradle / npm / Swift / pub manifests, and exact API signatures.

Note

What this folder is

  • Shared vocabulary (BALANCED, DEFAULT, PERCENTAGE, …) and how it maps onto each stack's tokens.
  • Formal mathematics of every kernel (formulas, constants, invariants). THEORY.md is tuned for GitHub’s math renderer (KaTeX subset); the submodule MATHEMATICS-AND-CALCULUS.md may use richer LaTeX.
  • Migration paths between AppDimens versions and from third-party libraries.
  • Cross-platform API mapping and orientation semantics.

What it is not — install lines, version numbers, or production build advice. Those live with the source code, in the submodule README you ship.

Android Compose naming reminder: conceptual BALANCED is published as Gradle strategy auto (tokens asdp, assp, ahdp, awdp, …); DEFAULT / FIXED is scaled (sdp, ssp, wdp, hdp, sem, …); PERCENTAGE / DYNAMIC is percent (psdp, …). The complete mapping lives in MIGRATION.md, PLATFORMS.md, and the canonical submodule reference appdimens-dynamic/DOCUMENTATION/MATHEMATICS-AND-CALCULUS.md.


Choose your learning path

flowchart TD
    startGoal["Pick your goal"]
    startGoal --> shipPath["Ship today"]
    startGoal --> theoryPath["Understand the math"]
    startGoal --> migratePath["Migrate from 1.x / 2.x / SDP-SSP"]
    startGoal --> portPath["Port across stacks"]
    startGoal --> rotatePath["Handle rotation / foldables"]
    startGoal --> recipePath["Copy-paste recipes"]
    shipPath --> guideDoc["GUIDE.md"]
    guideDoc --> submoduleA["Submodule README"]
    theoryPath --> theoryDoc["THEORY.md"]
    theoryPath --> mathDoc["appdimens-dynamic MATHEMATICS-AND-CALCULUS.md"]
    migratePath --> migDoc["MIGRATION.md"]
    portPath --> platDoc["PLATFORMS.md"]
    rotatePath --> orientDoc["ORIENTATION.md"]
    recipePath --> exDoc["EXAMPLES.md"]
If your goal is…Start hereThen go to
Ship today. Pick a strategy, write some code, move on.GUIDE.md — decision tree, FAQs, common patternsSubmodule README for your stack
Understand the math. Why these kernels? What are the formulas and invariants?THEORY.md — formal taxonomy, axioms, comparisonsMATHEMATICS-AND-CALCULUS.md
Migrate from 1.x / 2.x (unified DSL, .fxdp, .dydp) or from SDP/SSPMIGRATION.md — legacy ↔ Compose 3.x packagesThe submodule changelog you ship
Port across Android / iOS / KMP / Flutter / RN / WebPLATFORMS.md — concept ↔ submodule API, verified constantsThe matching submodule README
Rotate / foldable your UI without proportion driftORIENTATION.md — base orientation + inverter tokensCOMPOSE-API-CONVENTIONS.md
Copy-paste recipes per stackEXAMPLES.md — long-form snippetsThe submodule's app/ sample where available

The repository root README answers the higher-level questions (what is AppDimens? what problem does it solve? why pick it? where do I install?) and routes here for theory and there for code.


Document map

FileAudienceWhat you'll find
THEORY.mdEngineers / academicsFormal kernel taxonomy, axioms, formulas, AR multiplier, numerical comparisons, references
GUIDE.mdDay-to-day developersDecision tree, troubleshooting, strategy-per-use-case patterns
EXAMPLES.mdDevelopers shipping a screenCopy-paste recipes per platform (Android, iOS, Flutter, RN, Web)
MIGRATION.mdTeams upgrading from 1.x / 2.x / SDP-SSPLegacy naming ↔ appdimens-dynamic 3.x cheat sheet
PLATFORMS.mdCross-platform / design-system maintainersConcept ↔ API map across all stacks, verified Kotlin constants
ORIENTATION.mdDesigners / engineers handling rotationBase orientation, axis inverters, foldable semantics
html/Visual learnersInteractive scaling comparison pages
*.pdfSlide-deck consumersPrecision-scaling whitepapers and visual reports

Static and interactive visual assets live under html/ and the PDF essays in this same folder. Raster comparisons: ../IMAGES/README.md.


Glossary

Quick definitions for the terms that recur across every file in this folder.

TermMeaning
Hub labelStack-neutral name used in this folder (BALANCED, DEFAULT, PERCENTAGE, DYNAMIC).
KernelThe 1-D map f_S(b, c) that turns a base value b into an output, given a Configuration c. Each kernel has a name and an entry in appdimens-dynamic/DOCUMENTATION/.
auto / BALANCEDHybrid kernel: linear for axes ≤ 480 dp, logarithmic above. The recommended primary for multi-form-factor apps. (auto.md)
scaled / DEFAULT / FIXEDLinear-proportional kernel anchored at 300 dp. The SDP-style baseline. (scaled.md)
percent / PERCENTAGE / DYNAMICAxis-heavy proportional kernel. (percent.md)
SDPScalable density-independent pixel. Pre-computed @dimen/_*sdp resources in appdimens-sdps.
SSPScalable sp (text equivalent). Pre-computed @dimen/_*ssp in appdimens-ssps.
HingeThe axis-dp threshold where the auto kernel switches from linear to logarithmic. Constant: 480 dp.
AR multiplierThe optional aspect-ratio compensation referenced to 16:9 (AR = 1.78). Folded in by the a suffix on Compose tokens (16.sdpa, 16.asdpa, …) and by builder options on iOS / Flutter / RN / Web. (THEORY.md §4)
InverterA token suffix (Ph, Lw, Lh) that swaps the driving axis based on current orientation, so portrait-authored designs survive landscape rotation. (ORIENTATION.md)
QualifierA DpQualifier (SMALLEST_WIDTH, SCREEN_WIDTH, SCREEN_HEIGHT) used by *Qualifier facilitators to override sizing per breakpoint.
Fast bypassOptimization where simple no-AR kernels (scaled, auto, percent, fluid) skip the cache and compute a 2 ns multiply directly. (appdimens-dynamic/PERFORMANCE.md)

← Root README · Guide · Theory · Examples · Migration · Platforms · Orientation