Enriched Markdown for Android renders Markdown as native text in Jetpack Compose, with no WebView, including hidden text that the reader taps to reveal. By default, it hides under a field of drifting particles, but you can replace that overlay with your own and decide how hidden text looks and how it reveals itself.
To show what that unlocks, I built a haunted house: every room is a custom overlay revealing the same guest book in its own way. Cobwebs, crypt fog, jack-o'-lanterns, ghosts, bats, a stain that won't wash out, and a single candle.
How it works:
- You implement one interface, and it returns an overlay for each line the hidden text spans.
- Each overlay draws on the text view's Canvas, or on a Compose DrawScope, and can redraw every frame for animated effects.
- The library hands you the hidden words laid out exactly where the text view draws them, so you can pixelate, blur, or scramble the real text and nothing jumps on reveal. Override the reveal, and you control how it disappears, too.
Not every app needs a haunted house, so the README has a plain pixelation in about 30 lines: https://github.com/software-mansion/enriched-markdown/tree/main/packages/enriched-markdown-android#custom-overlays
Installation: https://docs.swmansion.com/enriched-markdown/android/basics/installation Docs (see the custom overlays section): https://docs.swmansion.com/enriched-markdown/android/api-reference/enriched-markdown-text
The rooms are demo code, not part of the library, which ships the particle field and a plain solid box. If it's useful to you, a ⭐ on GitHub helps more people find it: https://github.com/software-mansion/enriched-markdown
Feedback welcome, especially on which reveal you'd actually ship 🎃
submitted by /u/Sea-Arm9235[link] [comments]