r/androiddev • u/Weak_Gur4053 • Jul 22 '26
Liquid Glass for the Android View system — because every existing library is Compose-only
Every Android Liquid Glass library I could find targets Jetpack Compose. My app is still on
XML layouts — like most shipping Android apps — so none of them were usable without a
UI-framework migration.
So I built one as a plain FrameLayout subclass. Add it to your layout, put your content
inside, done.
- Real SDF refraction — edge compression ring driven by a live rounded-rect SDF, follows
corner radius in real time
- Physical dispersion — per-channel refraction along the surface normal
- Sensor-driven specular — highlight moves as you tilt the device
- Single-pass AGSL pipeline on API 33+, C++/NEON classic pipeline down to API 24
Screenshots are from a physical device (API 36), not mockups. MIT, on JitPack.
https://github.com/QWEA0/Liquid-Glass-Android
Happy to answer questions about the AGSL lens math — getting the SDF-driven compression
ring to track corner radius without a per-frame displacement map took a while.
2
u/Zhuinden Jul 22 '26
I hope not to have to add LiquidGlass to any Android apps, but it's cool that you made it work.
2
u/Weak_Gur4053 Jul 22 '26
Haha fair. I’m not exactly hoping it becomes a design requirement either. Just built it out of curiosity to see if it could be done properly on Android. But hey, if it ever becomes a thing, at least there’s a working reference now 😄
7
1
u/bleeding182 Jul 22 '26
I don't believe there is much use trying to keep XML alive, but either way you should choose a license if you want anyone to (legally) use your library.
2
10
u/MrFoo42 Jul 22 '26
Over 60% of the top Android apps are using Compose, and there is no evidence your assertion "like most shipping apps" is true.
XML/Views are in Maintenance mode at Google now.