Releases: bodenberg/appdimens-dynamic
3.1.4
AppDimens Dynamic 3.1.4
Easier cache refresh on configuration changes
We simplified DimenCache.invalidateOnConfigChange: you only need to pass the new configuration. You no longer have to keep track of the previous configuration yourself.
This makes the common “activity stays alive on rotation / resize / density changes” case easier to wire up—less boilerplate, fewer moving parts.
What to change in your app
If you were calling the old two-argument version, switch to the single-argument call with the latest Configuration you received (for example from onConfigurationChanged).
Docs and samples were updated to match. Sample activities include a commented example you can turn on when you use android:configChanges in your manifest.
3.1.3
3.1.2
What’s new
Plain facilitator overloads with Dp / TextUnit (Compose)
RotatePlain, ModePlain, QualifierPlain, and ScreenPlain (plus *PlainPx) now have overloads where the alternate value is Dp or TextUnit instead of Number. In those overloads, the library only evaluates the condition (orientation, UI mode, qualifier threshold, combined screen rule) and returns this or the alternate — no extra scaling, cache keys, or strategy-specific remember* on that path. Pass values already produced by the same strategy (e.g. 30.sdp.sdpRotatePlain(20.sdp)).
Existing Plain APIs with Number alternates are unchanged and not deprecated; they still scale the alternate in the active branch when that applies.
Coverage
Same pattern across all Compose scaling strategies (scaled, percent, power, auto, logarithmic, fluid, interpolated, diagonal, perimeter, fit, fill, density) for sw / height / width Dp and ssp / hsp / wsp Sp.
Docs & demo
README, beginner guide, COMPOSE-API-CONVENTIONS, and selected KDOC pages updated manually (no Dokka regen). The sample app demonstrates Plain Dp chains, nested Plain calls, and an Sp example with strategy routing.
Guidance (also documented)
- Nested extensions: order follows the expression (outside → inside).
DimenScaled/.screen(): priority is defined by the API, not by nesting order.- Long chains: prefer Plain with
Dp/TextUnitalternates to avoid double scaling of base and alternates.
3.1.1
📢 Important Update
Specific ProGuard rules have been added to the project.
🔧 What’s Changed?
- Added new configuration rules to ProGuard
- Adjustments to ensure:
- Better code obfuscation
- Preservation of required classes and methods
- Prevention of runtime errors
✅ Why This Matters
These rules help to:
- Protect the code against reverse engineering
- Improve application security
- Ensure compatibility with used libraries
📌 Note
Make sure to sync the project and validate functionality after this update.
🚀 If you have any questions, review the ProGuard configuration file (proguard-rules.pro)
3.1.0
3.0.0
3.0.0-beta
✨ What's New in Version 3.x
| Feature | Description |
|---|---|
| Dynamic Calculation | 100% code-level resolution — no XML files required, fits into any project size |
| DimenCache | Ultra-optimized, lock-free caching with persistence support |
| Aspect Ratio Scaling | applyAspectRatio flag for mathematically refined scaling on non-standard screen ratios |
| Multi-Window Support | ignoreMultiWindows flag to maintain scale during split-screen or app resizing |
| Inverter Shortcuts | .sdpPh, .sdpLw, .sdpLh, .sdpPw, .hdpLw, .hdpPw, .wdpLh, .wdpPh — orientation-aware switching |
| Facilitators | sdpRotate, sdpMode, sdpQualifier, sdpScreen — quick conditional overrides |
| DimenScaled Builder | Priority-based chain with UiModeType, DpQualifier, Orientation, and Inverter support |
| Foldable Detection | FoldingFeature integration — detects Fold/Flip open, closed, or half-opened states |
| UiModeType | NORMAL, TELEVISION, CAR, WATCH, DESK, APPLIANCE, VR_HEADSET, FOLD_OPEN, FOLD_CLOSED, FOLD_HALF_OPENED, FLIP_OPEN, FLIP_CLOSED, FLIP_HALF_OPENED |
| Physical Units | DimenPhysicalUnits — convert mm, cm, inches to Dp/Px |
| Sp & TextUnit | Full support for Scalable Sp (ssp) and Fixed Sp (sei) — respects or ignores font scale |