英文:
How to crop specific areas of a container while preserving the shadow underneath in Jetpack Compose?
问题
我有一个容器(卡片、盒子或其他任何东西...)里面有两个有问题的区域,用红圈标出。我需要裁剪这些区域,同时确保底下的阴影被保留。我尝试了不同的方法,但是我找不到有效裁剪这些区域的解决方案。
英文:
I have a container (Card, Box, or whatever..) that contains two problematic areas, marked with red circles. I need to crop these areas out while ensuring that the shadow underneath is preserved.
I have tried different approaches, but I couldn't find a solution to crop the areas effectively.
答案1
得分: 1
使用.border(width = ..., color = .., CustomShape(...))
修饰符与自定义形状一起使用。这里有一个详细的解释使用Jetpack Compose的自定义形状
结果:
英文:
Use the .border(width = ..., color = .., CustomShape(...))
modifier with a custom shape. Here is a detailed explanation Custom Shape with Jetpack Compose
The result:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论