Skip to content

0.1.0

Choose a tag to compare

@timkrest timkrest released this 26 Aug 12:41
· 47 commits to main since this release
implementation("com.timkrest:underlay:0.1.0")

Added

  • Modifier.blurredUnderlay(blurRadius, tint, fallback, onSourceChange) — a blurred backdrop for
    overlays rendered in their own window, on API 24 and above.
  • Three-step degradation reported through UnderlaySource: SystemBlur (FLAG_BLUR_BEHIND, API
    31+), Snapshot (PixelCopy of the host window, decorView.draw() below API 26) and Fallback
    (a solid color). A fourth value, Pending, covers the frames where a capture is in flight: only
    the tint is drawn there, so an overlay never flashes an opaque fallback on its way to a snapshot.
  • Live fall-through from SystemBlur to Snapshot when the system disables cross-window blur, via
    WindowManager.addCrossWindowBlurEnabledListener.
  • Snapshot re-capture when the host window changes size or configuration. Changing only
    blurRadius re-blurs the pixels already captured rather than reading the window back again.
  • :sample application covering all four window kinds: Dialog, Popup, a translucent activity
    and a plain in-window overlay.
  • Instrumentation coverage of every rung of the ladder, run on API 24, 28, 31 and 34: the software
    decorView draw, PixelCopy, and FLAG_BLUR_BEHIND. The step each test asserts follows what the
    device offers, not the API level, so a device with cross-window blur switched off is covered too.