Delete legacy docs

This commit is contained in:
Kyant0 committed 2025-09-23 21:07:23 +08:00
1 parent 53766b2874
commit 422423aed1
3 files changed
+11 -103

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownSettings">
<option name="previewPanelProviderInfo">
<ProviderInfo name="Compose (experimental)" className="com.intellij.markdown.compose.preview.ComposePanelProvider" />
</option>
</component>
</project>
+3 -5
View File
@@ -2,17 +2,15 @@
![frontPhoto](artworks/banner.png)
Apple's Liquid Glass effect for Android Jetpack Compose.
Liquid Glass effect for Android Jetpack Compose.
## Docs
[![JitPack Release](https://jitpack.io/v/Kyant0/AndroidLiquidGlass.svg)](https://jitpack.io/#Kyant0/AndroidLiquidGlass)
⚠️ The library is in alpha stage, every API may be changed, use it on your own risk.
⚠️ The library is in early alpha stage, every API may be changed, use it on your own risk.
[Latest docs](https://kyant.gitbook.io/backdrop)
[legacy docs (before 1.0.0-alpha10)](docs/LegacyDocs.md)
[Documentation](https://kyant.gitbook.io/backdrop)
## Demos
-98
View File
@@ -1,98 +0,0 @@
# Legacy Documentation
## 1.0.0-alpha09
```kotlin
val backdrop = rememberLayerBackdrop(backgroundColor = Color.White)
Box {
// backdrop content used to fill the backdrop layer
Box(Modifier.backdrop(backdrop))
// icon button with glass effect
Box(
Modifier
// [optional] drop shadow effect
.backdropShadow(CircleShape)
// draw the backdrop with glass effect
.drawBackdrop(backdrop) {
// set the shape
shape = CircleShape
// apply visual effects
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
saturation()
blur(2f.dp)
// here is the glass effect
refraction(height = 8f.dp.toPx(), amount = size.minDimension)
}
// [optional] draw a brilliant highlight
drawHighlight()
}
.clickable {}
.size(48.dp),
contentAlignment = Alignment.Center
) {}
}
```
## Before 1.0.0-alpha09 (exclusive)
```kotlin
val providerState = rememberLiquidGlassProviderState(
// if the providing content has any transparent area and there is a background behind the content, set the
// background color here, or set it to null
backgroundColor = Color.White
)
// the content behind the glass
Box(Modifier.liquidGlassProvider(providerState))
// glass
Box(
Modifier.liquidGlass(
providerState,
GlassStyle(
shape = RoundedCornerShape(16f.dp),
// you can customize more properties
innerRefraction = InnerRefraction(
height = RefractionHeight(8f.dp),
amount = RefractionAmount((-16f).dp),
depthEffect = 0f // or `1f` to have more 3D effect
),
dispersion = Dispersion.None, // or `Dispersion.Automatic` to enable dispersion effect
material = GlassMaterial(
blurRadius = 2f.dp,
brush = SolidColor(Color.White),
alpha = 0.3f
),
highlight = GlassHighlight.Default,
shadow = GlassShadow.Default // or `null` to disable shadow
)
)
)
```
Use the block modifier variant to improve performance when the style changes frequently:
```kotlin
val progress by animateFloatAsState(if (isPressed) 1f else 0f)
Box(
Modifier.liquidGlass(providerState) {
GlassStyle(
shape = RoundedCornerShape(16f.dp),
innerRefraction = InnerRefraction(
height = RefractionHeight(8f.dp * progress),
amount = RefractionAmount((-16f).dp * progress)
),
material = GlassMaterial(
blurRadius = 2f.dp * progress,
brush = SolidColor(Color.White),
alpha = 0.3f * progress
)
)
}
)
```