Skip to content

1.0.2

Choose a tag to compare

@bodenberg bodenberg released this 14 Oct 01:25
· 169 commits to main since this release

🚀 AppDimens: The Next Generation in Android Responsive Design

Say goodbye to the rigidity of fixed Dp values! AppDimens transforms your dimensioning into a smart and predictable system, ensuring your design is visually consistent and impeccable on any device, from the smallest Wearable to the largest $4K$ TV.

This release introduces a fully adaptive dimensioning architecture, allowing your components to grow either smoothly and controlled or proportionally and aggressively, according to your design needs.

✨ Release Highlights:

  • Dual Dimensioning (FXDP vs. DYDP): Choose between the Fixed (FX) adjustment, which uses a refined logarithmic logic with Aspect Ratio (AR) for subtle, visual comfort growth (ideal for icons and paddings), and the Dynamic (DY) adjustment, which maintains a constant percentage proportion with the screen (perfect for cards and main layouts).
  • Optimized Performance: Swap the complexity of thousands of traditional SDP dimens.xml files for an optimized and memorized runtime calculation. Adjustment factors are calculated only once per screen configuration change, ensuring flexibility and low overhead.
  • Unified Support: Native and simplified integration for both the View System/XML (via Gateway and Data Binding) and Jetpack Compose (via Extensions).
  • Advanced Functionality:
    • Physical Units (MM/CM/INCH): Define dimensions with absolute precision based on real-world measurements, crucial for Wear OS and measurement systems.
    • Intelligent Item Count: Use calculateAvailableItemCount to dynamically solve the spanCount in GridLayoutManager and LazyVerticalGrid.

With AppDimens, you ensure that $48\text{dp}$ has the correct visual weight, regardless of the screen size!