You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Jetpack Compose中Box组件阴影表现异常的技术咨询

效果对比与实现代码

效果展示

  • 期望效果:
    期望效果
  • 当前实现效果:
    当前实现效果

已编写的Compose代码

Box(
    modifier = Modifier
        .border(
            width = 1.dp,
            brush = Brush.linearGradient(colors = listOf(Color(0xFFEB00FF), Color(0xFF000AFF))),
            shape = RoundedCornerShape(2)
        )

        .height(353.dp)
        .width(534.dp)

        .background(
            color = Color.White,
            shape = RoundedCornerShape(2)
        )

        .shadow(
            shape = RoundedCornerShape(2),
            elevation = 12.dp,
            ambientColor = Color(0xFF9FA3F8),
            spotColor = Color(0xFF9FA3F8)
        ),
)

内容的提问来源于stack exchange,提问作者cfdaniel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 04:02:04