Jetpack Compose 中的阴影

时间:2021-07-31 02:32:39

标签: android-jetpack-compose

这个Shadow功能有什么用 https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow

Shadow(color: Color, offset: Offset, blurRadius: Float)

1 个答案:

答案 0 :(得分:0)

用于对文本应用阴影,简单示例:

Text(
    "Hello",
    style = LocalTextStyle.current.copy(
        shadow = Shadow(
            color = Color.Blue,
            offset = Offset(10f, 10f),
            blurRadius = 10f,
        )
    )
)