Every Android coachmark library I tried felt incom...
# multiplatform
a
Every Android coachmark library I tried felt incomplete—screenshot overlays, z-index nightmares, no customization. So I built Lumen: transparent coachmarks for Jetpack Compose that actually work. 📖 Blog: https://aditlal.dev/introducing-lumen-transparent-coachmarks-for-jetpack-compose/ 📚 Docs: https://aldefy.github.io/Lumen/ GitHub: https://github.com/aldefy/Lumen
o
Got a 404 on the Wasm demo.
a
Noted , checking ( hosted provider flagged some error)
👍 1
Just checked — both demos are loading fine on my end. Could be a caching issue, try a hard refresh (Ctrl+Shift+R) - Demo (https://aldefy.github.io/Lumen/demo/) - loads successfully with the “Lumen Sample” Compose app - Dashboard (https://aldefy.github.io/Lumen/dashboard/) - loads successfully with the “Lumen Analytics” dashboard
for reference
o
That link worked for me as well. The one that still does not is here: https://aldefy.github.io/Lumen/#/
a
Great catch - updating - i mixed it up with a recent Public urls not loading well fixing the doc site
👍 1
All wired up now thanks for feedback
👍 1
s
hi @adit great library Can this work for XML embedded Compose views? i.e
Copy code
<LinearLayout
 android:orientation="vertical"
 android:layout_width="match_parent"
 android:layout_height="match_parent">

 <TextView
 android:text="Header"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"/>

 <androidx.compose.ui.platform.ComposeView //here can this coach mark works?
 android:id="@+id/composeView"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"/>

</LinearLayout>
a
Hey Suresh, thanks! Good question, Lumen works fine inside a ComposeView. Lumen doesn’t care whether you’re in a full-Compose activity or a ComposeView sitting inside XML. Just wrap your content with CoachmarkHost:
Copy code
composeView.setContent {
      val controller = rememberCoachmarkController()

      CoachmarkHost(controller = controller) {
          // your compose UI with coachmark targets
      }
  }
The catch: the overlay is scoped to the ComposeView’s bounds. So if your ComposeView only takes part of the screen, the scrim won’t cover that XML TextView above it. Coachmarks for anything inside the Compose tree will work perfectly though. If you need full-screen overlay coverage (including the XML parts), you’d want to either go full Compose for that screen or make the ComposeView fill the whole layout.