AppDimens .NET Bindings

May 23, 2026 · View on GitHub

Monorepo of .NET 10 for Android bindings and a native .NET MAUI library for the AppDimens responsive dimension ecosystem. Android binding packages target net10.0-android and embed upstream Maven AARs. MAUI package Bodenberg.AppDimens.Maui.Sdps targets net8.0, net9.0, and net10.0 (multi-platform).

Android implementation, XML naming, and feature documentation live in the upstream repositories listed below. This repository contains binding projects, MSBuild transforms, smoke-test apps, and publish notes only.


Packages

NuGet packageFolderAndroid library (source)Focus
Bodenberg.AppDimens.Sdpsappdimens-sdps-net-binding/appdimens-sdpsLayout + typography — SDP/HDP/WDP and SSP/HSP/WSP via @dimen grids and code APIs
Bodenberg.AppDimens.Sspsappdimens-ssps-net-binding/appdimens-sspsTypography only — SSP/HSP/WSP (smaller if you do not need layout dimens)
Bodenberg.AppDimens.Dynamicappdimens-dynamic-net-binding/appdimens-dynamicCode-only scaling — 15 strategies, no pre-built @dimen XML grids
Bodenberg.AppDimens.Maui.Sdpsappdimens-sdps-net/appdimens-sdps.NET MAUI nativo — SDP/HDP/WDP/SSP sem binding Android (net8 / net9 / net10)

Versões NuGet atuais: bindings Android 3.5.1.4 · MAUI nativo 3.5.2 (veja cada README para a versão do AAR Maven embutido nos bindings).

dotnet add package Bodenberg.AppDimens.Sdps --version 3.5.1.4
dotnet add package Bodenberg.AppDimens.Ssps --version 3.5.1.4
dotnet add package Bodenberg.AppDimens.Dynamic --version 3.5.1.4
dotnet add package Bodenberg.AppDimens.Maui.Sdps --version 3.5.2

Which package should I use?

NeedPackage
Responsive margins, padding, sizes and text with @dimen/_16sdp-style XML (Android binding)Sdps
Text / sp only, smaller dependencySsps
Runtime strategies (percent, auto, fluid, …) without thousands of XML dimensDynamic
MAUI multiplataforma (Android, iOS, Windows, macOS) com {sdp:16} e APIs C# nativasMaui.Sdps

You can combine packages only when your app design allows overlapping responsibilities; most apps pick one primary approach per surface.


Repository layout

Each binding is a self-contained tree:

appdimens-net-binding/
├── appdimens-sdps-net/              # Native MAUI SDP (net8/9/10)
├── appdimens-sdps-net-binding/
│   ├── AppDimens.Sdps.sln
│   ├── AppDimens.Sdps.Binding/      # NuGet + AAR binding
│   ├── AppDimens.Sdps.SmokeTest/    # Optional compile smoke APK
│   ├── Directory.Build.props        # Android SDK / JDK fallbacks (local builds)
│   ├── README.md                    # Consumer documentation (packed into NuGet)
├── appdimens-ssps-net-binding/      # same structure
└── appdimens-dynamic-net-binding/
ProjectRole
*.BindingLibrary binding project — produces Bodenberg.AppDimens.*.nupkg
*.SmokeTestMinimal Android app to verify the binding compiles
scripts/sync-aar-from-maven.shDownloads the upstream AAR from Maven Central into Jars/

Requirements

RequirementNotes
.NET10 with Android workload (dotnet workload install android) or MAUI
Target frameworkBindings: net10.0-android · MAUI: net8.0 / net9.0 / net10.0
Minimum Android API24 (matches packaged AARs)
JDK17 or 21 for Xamarin.Android on .NET 10
Android SDKPlatform 36+ for local binding builds

Each subfolder includes Directory.Build.props with common paths (ANDROID_HOME, ~/Android/Sdk, OpenJDK 17/21) so command-line builds work without extra environment setup on many Linux/macOS machines.


Build locally

From any binding folder:

cd appdimens-sdps-net-binding   # or ssps / dynamic
dotnet build AppDimens.Sdps.sln -c Release

Override the Android SDK if needed:

dotnet build -p:AndroidSdkDirectory=/path/to/Android/Sdk

Refresh the embedded AAR after a new Maven release:

./scripts/sync-aar-from-maven.sh 3.1.5
# Update Jars/*.aar and <AndroidLibrary Include=...> in the .csproj when the filename changes

Smoke-test APKs (binding validation)

Minimal apps (*.SmokeTest) compile against each binding on .NET 10. To produce signed APKs for device/emulator testing:

dotnet publish AppDimens.Sdps.SmokeTest/AppDimens.Sdps.SmokeTest.csproj -c Release -f net10.0-android -p:AndroidPackageFormat=apk

Pre-built APKs for the current binding release are copied to artifacts/smoke-apks/ when generated locally (filenames include package id and version 3.5.1.4).


NuGet metadata

NuGet fieldURL
Project website (all packages)https://github.com/bodenberg/appdimens
Source repositoryPer package → upstream Android repo (appdimens-sdps, appdimens-ssps, appdimens-dynamic)
Binding source (this repo)https://github.com/bodenberg/appdimens-net-binding

Publishing steps: NUGET-PUBLISH.md (MAUI nativo + bindings Android).


Documentation

TopicWhere
Sdps usage, C# namespaces, XML dimensappdimens-sdps-net-binding/README.md
Maui.Sdps nativo (XAML, markup, builders)appdimens-sdps-net/README.md
Ssps typography APIsappdimens-ssps-net-binding/README.md
Dynamic strategies & facilitatorsappdimens-dynamic-net-binding/README.md
Dynamic strategy guide (Android)appdimens-dynamic/DOCUMENTATION
AppDimens umbrella projectappdimens

ResourceURL
AppDimens (main project)https://github.com/bodenberg/appdimens
Android SDPShttps://github.com/bodenberg/appdimens-sdps
Android SSPShttps://github.com/bodenberg/appdimens-ssps
Android Dynamichttps://github.com/bodenberg/appdimens-dynamic
This repositoryhttps://github.com/bodenberg/appdimens-net-binding

License

Apache 2.0, consistent with the upstream AppDimens libraries.