callstack / callstack/react-native-paper

Why the more Card components I have, the more elevated they are?

未关闭
#4,484 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
TypeScript
星标
14.5k
派生
2.2k
平均合并
5 天 23 小时
30 天内合并 PR
12

描述

Hello,

I just realized something weird on Android 14 (but it might happen on any device): The more I display a Card component, the more elevated it gets.

So for example, I map through data and display a Card component for each data, one below another.

So I have, let's say, 8 times the exact same component but still, they don't have the same elevation. The one at the top has almost no shadow and the last one has a huge shadow. I tried setting elevation={1} but it does the same. Only elevation={0}, which removes the elevation completely, works fine and all cards component are consistent with no shadow.

Am I doing something wrong or am I missing something? I can't seem to find a fix for this behavior.

See the screenshot below for more details, elevation is set to 5 and all components are the exact same component with the same style:

![image](https://github.com/user-attachments/assets/1c7ec5d1-8708-4792-84e5-1570a1a57dec)

If someone knows what is happening, feel free to drop an answer, thanks!

贡献指南

打开贡献指南

调研方向

首先,在 Android 14 上复现一个 elevation 设置为 5 的 Card 组件映射列表,并以屏幕截图和报告的行为作为参考。比较各个 Card 之间渲染出的阴影,并检查 Card 组件及其对 Android elevation 的处理;完成的标准是确定原因,并使重复的 Card 渲染出一致的 elevation,或者将该问题记录为预期行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, react-native, typescript
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。