Fix demo
This commit is contained in:
1 parent
c2203e1f04
commit
79e2615959
6 files changed
+32
-4
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user