Skip to content

0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Sep 00:55
2faf4e1

Backgrounds behind the popup: one pane of translucent glass, or the artwork blurred into a slowly drifting backdrop, behind both the bar and the expanded card. The sample app now ships as a signed APK on every release.

The sample app in a phone frame, with the popup bar dragged open into the player and the backgrounds switched

Install

Add maven("https://jitpack.io") to your repositories, then:

implementation("com.github.fethica:compose-popupbar:0.2.0")

The sample app from the recording is attached below as an APK (Android 7.0+).

Changes

  • Added PopupBackground and the host's background parameter. Translucent(tint) is one pane of glass behind bar and card, the screen showing through a blur under a light tint with a lit edge on the bar (real blur on API 31+, a tinted scrim below). Artwork(scrim, blurRadius, animated) blurs the popupImage into one slowly drifting backdrop behind bar and card, the way Apple Music's player does; it needs a popupImage and API 31, and falls back to the plain card otherwise. Both take their tone from the theme through containerColor, a tint or a scrim colours them, and on tinted glass and on the artwork PopupBarDefaults.colors() and the popup content's LocalContentColor turn black or white with the tone of what they sit on; untinted glass keeps the theme's own colours.
  • Sample: launcher icon, portrait lock on phones, a themed root surface that follows the phone's appearance, background choices (plain, tinted and cover-tinted glass, artwork), a different cover for every track so the artwork background can be judged on light and dark covers, a browse grid of colourful category cards for the glass to show through, an Up next queue in the scrolling player, and the popup inset applied as content padding so the bar floats over the lists as the documentation asks.
  • background comes after hapticsEnabled in PopupHost, so a 0.1.0 call that passes its arguments positionally and the screen content as a trailing lambda still compiles; a call that passes the content lambda inside the parentheses positionally now needs background or a named content. Binary compatibility between 0.x releases is not a goal: rebuild against each release rather than swapping the artifact under compiled code.
  • publishToMavenLocal now publishes as com.github.fethica:compose-popupbar, the coordinate JitPack serves, so local and published installs share one coordinate.
  • Every version tag builds the sample as a signed, minified release APK and publishes the GitHub release with it, this section as the notes. The sample's version follows VERSION_NAME in gradle.properties instead of its own numbers.

Configuration, the state API, insets and the sample recipes are in the documentation.