This commit is contained in:
Kyant0 committed 2025-07-28 12:14:44 +08:00
1 parent c2203e1f04
commit 79e2615959
6 files changed
+32 -4

No files matched your search

+23
View File
@@ -63,6 +63,29 @@ Box(
)
```
#### [Experimental] Dynamically adjusted tint by content behind the glass
```kotlin
val luminanceSampler = remember { ContinuousLuminanceSampler() }
liquidGlass(
providerState,
luminanceSampler = luminanceSampler
) {
val luminance = luminanceSampler.luminance
GlassStyle(
// ...
material = GlassMaterial(
brush = SolidColor(Color.White), // or Color.Black
alpha = luminance // write down your own logic here
)
)
}
```
See [here](./glassmusic/src/main/java/com/kyant/glassmusic/BottomTabs.kt#L129) for more details.
### Limitations
The following case is not supported: