Skip to content

systembars 0.1.0

Choose a tag to compare

@sonms sonms released this 25 Oct 11:32
· 12 commits to master since this release
7b593e0

systembars 0.1.0

First public release / 첫 공개 릴리스.

implementation("io.github.sonms:systembars:0.1.0")

English

Status/navigation bar icons that adapt to whatever is drawn behind them. enableEdgeToEdge() only makes the bars transparent; it does not pick icon contrast per screen.

Highlights

  • Modifier.systemBars(status, navigation) + a single SystemBarsHost at the root.
  • BarContent: Auto (samples the Compose content behind the bar, no PixelCopy), AutoWindow (PixelCopy, API 26+, covers SurfaceView/video), Background(color), Light, Dark, Inherit.
  • BarPaint (None by default / Sampled / Solid(color)): optionally paint the bar area to match the screen.
  • Nested modifiers stack (deepest wins); only the winning node samples. Dialog windows supported (SystemBarsDialog).
  • 3-button navigation: scrim-aware icon choice; on API < 29 the window's navigationBarColor is used as the scrim.
  • Hysteresis (0.45 / 0.55) to avoid icon flicker; sampling is throttled (SystemBarsConfig.intervalMillis, default 300 ms).
  • Survives configuration changes. Explicit API mode, bilingual (KO/EN) KDoc, Dokka docs.

Notes

  • Android only, minSdk 24. Call enableEdgeToEdge() yourself before setContent.
  • The default enableEdgeToEdge() lays a translucent scrim on the navigation bar (API < 29 / 3-button); pass a transparent navigationBarStyle if you want BarPaint to show through.
  • The API is 0.x and may still change.

Docs: https://sonms.github.io/Velvet-Compose/systembars/ · README

한국어

화면마다 다른 배경 위에서 상태바/내비바 아이콘이 잘 보이도록 자동으로 맞춰 주는 라이브러리입니다. enableEdgeToEdge() 는 바를 투명하게 만들 뿐 아이콘 명암은 맞춰 주지 않습니다.

주요 기능

  • Modifier.systemBars(status, navigation) 와 루트의 SystemBarsHost 하나.
  • BarContent: Auto(바 뒤 Compose 내용을 샘플링, PixelCopy 없음), AutoWindow(PixelCopy, API 26+, SurfaceView/영상 포함), Background(color), Light, Dark, Inherit.
  • BarPaint(기본 None / Sampled / Solid(color)): 바 영역 색도 화면에 맞춰 칠할 수 있습니다.
  • 중첩된 modifier 는 스택으로 동작(가장 깊은 것이 우선)하고 이긴 노드만 샘플링합니다. Dialog 지원(SystemBarsDialog).
  • 3버튼 내비바: 스크림을 반영해 아이콘을 고르고, API 29 미만은 윈도우의 navigationBarColor 를 스크림으로 사용합니다.
  • 히스테리시스(0.45 / 0.55)로 아이콘 깜빡임 방지, 샘플링 간격 제한(SystemBarsConfig.intervalMillis, 기본 300ms).
  • 구성 변경(회전 등)에도 유지됩니다. explicit API 모드, 한국어/영어 KDoc, Dokka 문서.

참고

  • Android 전용, minSdk 24. setContent 전에 enableEdgeToEdge() 를 직접 호출해야 합니다.
  • 기본 enableEdgeToEdge() 는 내비바에 반투명 스크림을 깝니다(API 29 미만 / 3버튼). BarPaint 가 그대로 보이게 하려면 navigationBarStyle 을 투명으로 지정하세요.
  • 아직 0.x 라 API 가 바뀔 수 있습니다.

문서: https://sonms.github.io/Velvet-Compose/systembars/ · README