Android 反应原生中的影子
如何在 Android 中实现落在 View 组件顶部的阴影? 就像所附的图像一样,卡片有顶部阴影。
Elevation 有一个固定的光点,它总是会创建一个底部阴影,这与我可以更改偏移量的 iOS 选项不同。 我研究过诸如react-native-shadows之类的包,但它似乎对性能有很大影响,并且不如本机阴影那么清晰。
还有其他选择吗?
How can I achieve a shadow in Android that drops at the top of a View component?
Like the image attached where the card has a top shadow.
Elevation has a fixed light point which always create a bottom drop shadow unlike iOS options where I can change the offset.
I've looked into packages such as react-native-shadows but it seems to have a big impact on performance and isn't as crisp as native shadows.
Is there any other alternatives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个阴影生成器: https://ethercreative.github.io/react-native -阴影生成器/
Try this Generator for shadow: https://ethercreative.github.io/react-native-shadow-generator/