callstack / callstack/react-native-paper

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

Đang mở
#4,484 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
TypeScript
Star
14.5k
Fork
2.2k
Merge trung bình
5 ngày 23 giờ
Pull request đã merge (30 ngày)
12

Mô tả

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!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by reproducing a mapped list of Card components on Android 14 with elevation set to 5, using the screenshot and reported behavior as the reference. Compare the rendered shadows across cards and inspect the Card component and its Android elevation handling; done means the cause is identified and repeated cards render consistent elevation or the issue is documented as expected behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, react-native, typescript
Lĩnh vực
mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.